Skip to content

Troubleshooting

James Tai edited this page Jun 27, 2021 · 1 revision

coman: cannot find repository root; make sure you have a Coman.toml

Make sure that you are running coman inside your project folder (or in any subfolder), similar to how git requires you to run it inside a git repository. If you haven't set up a project, see the Getting started guide.

coman: compilation failed

There can be a few reasons for this:

coman test compiles the program but doesn't run any tests

Make sure you have put the tests in the right place. The tests should be in the same path as the source file, but under the test/ directory, and without the file extension. If the file name contains multiple periods, then only the part before the first one should be used (this allows creating multiple solutions for the same problem]). For example:

Source file path Test path
src/foo.cpp test/foo/
src/foo/bar/baz.py test/foo/bar/baz/
src/one.two.py test/one/

Each test should have an input file (with extension .in) and an output file (with the same file name, but with extension .out).

Output is correct, but test fails

If your tests are failing even though the output is identical, chances are the output or test case have extraneous whitespace that is causing it to not match exactly.

  • Check that the output file uses LF line endings, not CRLF.
  • Check that the output file has a final newline.
  • Check that your program outputs a final newline.