Open haved opened 4 months ago
I am generally in favor of this suggestion. However, @caleridas planned to change the unit test setup up to google test. I am not sure whether this change will help or be detrimental for this. How far along are you with it @caleridas ? Should we do this?
Ah, in that case Google tests probably has its own short syntax
I had started converting to googletest but it is unfinished. I can pick it up to standardize the testing infrastructure, and it uses a syntax like this (plus a couple other useful tools).
When registering tests individually, it currently looks like this:
This leads to a lot of repeated "jlm/util/TestHashSet" and "TestPair", and clang format likes to put blank lines between the test and register macro.
I was wondering if we would like to add macros to enable something like
A possible implementation we could add to the bottom of
test-registry.hpp
would be:To avoid static constructor ordering conflicts, the filename must be placed in a function (saying
static const std::string X = filename;
as a global variable does not work).