On the main ROOT page, two news posts by @Axel are listed on top:
- 2019-01-30 More tests, more benchmarks!
- 2019-01-30 Better argument parsing
I’ve got questions to both of them.
About testing:
In ROOT-9990, I added a test case for invalid formulae. However, these tests reside in the test
directory of the main ROOT repository, not in the separate roottest
repository mentioned in the post.
In the case of TFormula, now there are 51 tests (functions called “test1” to “test51”) in test/TFormulaParsingTests.h
in the root
repo, and further tests are in the root/hist/formula/
subdirectry of the roottest
repository. The latter seems to contain .C file invocations while the former seem to contain more unittest style tests. I added the test to TFormulaParsingTests.h (seemed to make more sense there, and yes, it’s a header file containing non-header code), but it is not really clear to me where to add further tests. Also, is there any preferred testing framework already in use (like Google Test or Catch2)? I find it a bit weird and error prone to count the number of tests manually and to “&&” the tests results inside of the testNN functions. So, tl;dr: a) which test framework to use (if any) and b) where to put the tests?
About command line parsing
I thought of the framework to use. Boost’s program_options came to mind (just because it is the first one I’ve used, not because of preference - I don’t have a strong opinion here). Is it okay to depend on Boost, or should one go for other libraries such as cxxopts or args? The non-boost libs might be smaller & easier to use, but with Boost there might be better long-term guarantees. And if an external lib is included, should it be downloaded during the build process, or should a specific version be copied into the ROOT repo? It seems to me more complicated to get these decisions right than to update the actual code once a decision has been made.