diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f633a16d..0c864989 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -53,6 +53,7 @@ add_executable (unittest "test_Ownership.cpp" "test_Overloads.cpp" "test_Self.cpp" + "test_Stl_Exception.cpp" "test_Stl_Map.cpp" "test_Stl_Optional.cpp" "test_Stl_Pair.cpp" diff --git a/test/test_Stl_Exception.cpp b/test/test_Stl_Exception.cpp index 1fdb1385..71be7694 100644 --- a/test/test_Stl_Exception.cpp +++ b/test/test_Stl_Exception.cpp @@ -10,7 +10,7 @@ using namespace Rice; TESTSUITE(StlException); -SETUP(Exception) +SETUP(StlException) { embed_ruby(); } @@ -43,6 +43,12 @@ TESTCASE(StlExceptionCreate) Object result = exception.call("hello"); ASSERT_EQUAL("Hello", detail::From_Ruby().convert(result.value())); +#ifdef _MSC_VER + std::string expected = "Uknown exception"; +#else + std::string expected = "std::exception"; +#endif + result = exception.call("what"); - ASSERT_EQUAL("Unknown exception", detail::From_Ruby().convert(result.value())); + ASSERT_EQUAL(expected, detail::From_Ruby().convert(result.value())); } \ No newline at end of file