Added TODO test case TestMemleak::stdstring
This commit is contained in:
parent
24d96b188e
commit
31f315d2ec
|
@ -212,7 +212,7 @@ private:
|
|||
// Using the function "exit"
|
||||
TEST_CASE(exit1);
|
||||
TEST_CASE(exit2);
|
||||
|
||||
TEST_CASE(stdstring);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2152,6 +2152,19 @@ private:
|
|||
"}\n");
|
||||
ASSERT_EQUALS(std::string(""), errout.str());
|
||||
}
|
||||
|
||||
void stdstring()
|
||||
{
|
||||
check("void f(std::string foo)\n"
|
||||
"{\n"
|
||||
" char *out = new char[11];\n"
|
||||
" memset(&(out[0]), 0, 1);\n"
|
||||
"}\n");
|
||||
|
||||
std::string err(errout.str());
|
||||
|
||||
TODO_ASSERT_EQUALS(std::string("[test.cpp:5]: (error) Memory leak: out\n"), err);
|
||||
}
|
||||
};
|
||||
|
||||
REGISTER_TEST(TestMemleak)
|
||||
|
|
Loading…
Reference in New Issue