Prevent duplicate test names from being registered

If a test case with the same name as an already registered test case is registered an error is logged to cerr and the program exits (with error level 1)
This commit is contained in:
Phil Nash committed 2012-02-09 08:34:01 +00:00
1 parent fd78e0f6df
commit 3fd7dc0218
3 files changed
+22 -7

No files matched your search

+12
View File
@@ -281,3 +281,15 @@ TEST_CASE( "./succeeding/unimplemented static bool", "static bools can be evalua
REQUIRE_FALSE( is_true<false>::value );
}
}
// Uncomment these tests to produce an error at test registration time
/*
TEST_CASE( "./sameName", "Tests with the same name are not allowed" )
{
}
TEST_CASE( "./sameName", "Tests with the same name are not allowed" )
{
}
*/