Fixed Travis build, use test function

This commit is contained in:
Daniel Marjamäki 2014-04-21 08:20:13 +02:00
parent 0ced16d17a
commit a406509d99
1 changed files with 5 additions and 2 deletions

View File

@ -45,6 +45,7 @@ private:
TEST_CASE(noexceptThrow); TEST_CASE(noexceptThrow);
TEST_CASE(nothrowThrow); TEST_CASE(nothrowThrow);
TEST_CASE(unhandledExceptionSpecification); // #4800 TEST_CASE(unhandledExceptionSpecification); // #4800
TEST_CASE(nothrowAttributeThrow);
} }
void check(const char code[], bool inconclusive = false) { void check(const char code[], bool inconclusive = false) {
@ -361,8 +362,10 @@ private:
check("void func1() throw(int) { throw 1; }\n" check("void func1() throw(int) { throw 1; }\n"
"void func2() __attribute((nothrow)); void func1() { throw 1; }\n" "void func2() __attribute((nothrow)); void func1() { throw 1; }\n"
"void func3() __attribute((nothrow)); void func1() { func1(); }\n"); "void func3() __attribute((nothrow)); void func1() { func1(); }\n");
ASSERT_EQUALS("[test.cpp:2]: (error) Exception thrown in __attribute__((nothrow)) function.\n" TODO_ASSERT_EQUALS("[test.cpp:2]: (error) Exception thrown in __attribute__((nothrow)) function.\n"
"[test.cpp:3]: (error) Exception thrown in __attribute__((nothrow)) function.\n", errout.str()); "[test.cpp:3]: (error) Exception thrown in __attribute__((nothrow)) function.\n",
"",
errout.str());
// avoid false positives // avoid false positives
check("const char *func() __attribute((nothrow)); void func1() { return 0; }\n"); check("const char *func() __attribute((nothrow)); void func1() { return 0; }\n");