testing: Fix cxxtest application for "no-rtti" builds
@@ -167,6 +167,7 @@ static void test_stl(void)
// Name: test_rtti
//***************************************************************************/
+#ifdef CONFIG_CXX_RTTI
static void test_rtti(void)
{
std::cout << "test rtti===============================" << std::endl;
@@ -185,6 +186,7 @@ static void test_rtti(void)
delete a;
delete b;
}
+#endif
//***************************************************************************
// Name: test_exception
@@ -198,7 +200,6 @@ static void test_exception(void)
{
throw runtime_error("runtime error");
}
-
catch (runtime_error &e)
{
std::cout << "Catch exception: " << e.what() << std::endl;
@@ -219,7 +220,9 @@ extern "C" int main(int argc, char *argv[])
test_ofstream();
test_iostream();
test_stl();
+#ifdef CONFIG_CXX_RTTI
test_rtti();
+#endif
#ifdef CONFIG_CXX_EXCEPTION
test_exception();
#endif
