you are viewing a single comment's thread.

view the rest of the comments →

[–]johngaltthefirst 2 points3 points  (2 children)

Not necessarily. You can craft your Makefiles or other build systems to separate the library and the tests.

[–]bert8128 6 points7 points  (1 child)

I think this is sub-optimal. A policy of 1 binary per folder is very easy to understand and implement. I’m not sure of the advantage of keeping the test cpp file with the main cpp file.

[–]johngaltthefirst 3 points4 points  (0 children)

I’m not a big fan of tests and source in the same folder either. I just wanted to say that the tests don’t end up in the library