cxx: Add a sanity check for C++ exception support

pull/1206/head
Angus Gratton 2017-10-04 16:00:11 +11:00 zatwierdzone przez Angus Gratton
rodzic 86c89ff169
commit a231ba22f3
1 zmienionych plików z 15 dodań i 0 usunięć

Wyświetl plik

@ -188,6 +188,21 @@ TEST_CASE("before scheduler has started, static initializers work correctly", "[
TEST_ASSERT_EQUAL(2, StaticInitTestBeforeScheduler::order);
}
TEST_CASE("c++ exceptions work", "[cxx]")
{
int thrown_value;
try
{
throw 20;
}
catch (int e)
{
thrown_value = e;
}
TEST_ASSERT_EQUAL(20, thrown_value);
printf("OK?\n");
}
/* These test cases pull a lot of code from libstdc++ and are disabled for now
*/
#if 0