-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Name test files consistently #34
Comments
At the same time it would be good to name the resulting executables consistently (e.g. if the test source is |
Could you explain the relationship with include directives specifically? I seem to be missing the point. |
This is a general point. If files aren't named consistently, then including them will also be inconsistent, e.g. #include <mylib/test_mytest.tcc>
#include <mylib/mysecondtest_test.tcc> This is completely inconsistent.
These are then included, e.g. https://github.com/clearmatics/zeth/blob/master/libzeth/tests/snarks/groth16/groth16_api_handler_test.cpp#L7 While we use the suffix |
Most of the test files are named
test_<filename>.cpp
, nevertheless https://github.com/clearmatics/libsnark/blob/develop/libsnark/gadgetlib1/tests/gadgetlib1_test.cpp is named<filename>_test.cpp
which contrasts with the rest. This is inconsistent, and this inconsistency is ever more striking on #29 where a list of test files are added in thegadgetlib1/tests
folder and named with atest_
prefix.We need to bring consistency in how we name test files to have clean
includes
and a systematic way of creating tests. While the overwhelming set of test files is using thetest_
prefix in libff and libsnark, the_test
suffix is used in:As such, I am in favor to adopt the
<filename>_test.cpp
naming convention for all test files across all projects to keep naming consistent and systematic and have similar lookinginclude
directives.The text was updated successfully, but these errors were encountered: