1
0
forked from Alepha/Alepha

Individual TableTest cases can be disabled.

This commit is contained in:
2023-11-13 11:45:56 -05:00
parent 4682fe3ffb
commit c6b66aa7b5
5 changed files with 92 additions and 17 deletions

View File

@ -75,16 +75,15 @@ namespace
{ "Expect exception value specific (loose)", { -42 }, std::runtime_error{ "Cannot be negative." } },
/* These cases should fail, but we don't want to fail them in normal builds. */
#if 0
{ "Basic value case", { -42 }, { 42, 42, 42 } },
{ "Ignore exceptions case (`std::nothrow`)", { -42 }, std::nothrow },
{ "Ignore exceptions case (`std::type_identity< void >`)", { -42 }, std::type_identity< void >{} },
{ "Expect exception type runtime_error", { 42 }, std::type_identity< std::runtime_error >{} },
{ "Expect exception type exception", { 42 }, std::type_identity< std::exception >{} },
{ "Expect exception value specific", { 42 }, DerivedError{ "Cannot be negative." } },
{ "Expect exception value specific (loose)", { 42 }, std::runtime_error{ "Cannot be negative." } },
{ "Expect exception value specific (wrong)", { -42 }, std::logic_error{ "Cannot be negative." } },
#endif
/* A few different ways of disabling these tests are shown below. */
{ Skip <="Basic value case", { -42 }, { 42, 42, 42 } },
{ !!Disable <="Ignore exceptions case (`std::nothrow`)", { -42 }, std::nothrow },
{ -Enable <="Ignore exceptions case (`std::type_identity< void >`)", { -42 }, std::type_identity< void >{} },
{ -"Expect exception type runtime_error"_case, { 42 }, std::type_identity< std::runtime_error >{} },
{ Disable <="Expect exception type exception", { 42 }, std::type_identity< std::exception >{} },
{ !"Expect exception value specific"_case, { 42 }, DerivedError{ "Cannot be negative." } },
{ Skip <="Expect exception value specific (loose)", { 42 }, std::runtime_error{ "Cannot be negative." } },
{ Skip <="Expect exception value specific (wrong)", { -42 }, std::logic_error{ "Cannot be negative." } },
};
};
}