You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When registering tests individually, it currently looks like this:
staticintTestPair()
{
// Actual test in herereturn0;
}
JLM_UNIT_TEST_REGISTER("jlm/util/TestHashSet-TestPair", TestPair)
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
// Once per fileJLM_UNIT_TEST_FILE("jlm/util/TestHashSet")
JLM_UNIT_TEST(TestPair)
{
// Actual test in herereturn0;
}
JLM_UNIT_TEST(TestUniquePointer)
{
// More test herereturn0;
}
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).
The text was updated successfully, but these errors were encountered:
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?
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).The text was updated successfully, but these errors were encountered: