mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
cxx: Add a sanity check for C++ exception support
This commit is contained in:
parent
86c89ff169
commit
a231ba22f3
@ -188,6 +188,21 @@ TEST_CASE("before scheduler has started, static initializers work correctly", "[
|
|||||||
TEST_ASSERT_EQUAL(2, StaticInitTestBeforeScheduler::order);
|
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
|
/* These test cases pull a lot of code from libstdc++ and are disabled for now
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user