Skip to content

Add test of tested functors

Sascha Stahl requested to merge add_test_for_functors_tested into master

This MR adds a test which tries to check how many functors are tested in the sense that they are compiled in TestFunctors.cpp. The test is relatively simple. It gets all functors from Functors.__init__ and then checks if their C++ name appears in TestFunctors.cpp.

Obviously it's a very simplified test but it is probably better than nothing and I created it more as a starting point to discuss.

Currently the test makes a difference between bound and not bound functors. Bound functors are fully specified and probably slightly easier to test. Not bound functors need some input which often can be dummy. So I am happy to remove the distinction.

Ideas for improvements:

  • It is not clear for which C++ class the functors are compiled. Probably there would need to be files like TestFunctors_particle_v1.cpp, TestFunctors_particle_v2.cpp and TestFunctors_mcparticle.cpp, TestFunctors_others.cpp .
Edited by Sascha Stahl

Merge request reports