TestConstructors: Unremove a test case
This commit is contained in:
parent
2cd8ea83a7
commit
f6e7a66f42
|
@ -348,6 +348,19 @@ private:
|
|||
" int x;\n"
|
||||
"};");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
const char code[] = "template <class T> struct A {\n"
|
||||
" A<T>() : x(0) { }\n"
|
||||
" A<T>(const T & t) : x(t.x) { }\n"
|
||||
"private:\n"
|
||||
" int x;\n"
|
||||
" int y;\n"
|
||||
"};";
|
||||
check(code);
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
check((code + std::string("A<int> a(10);")).c_str());
|
||||
ASSERT_EQUALS("[test.cpp:2]: (warning) Member variable 'A < int >::y' is not initialized in the constructor.\n"
|
||||
"[test.cpp:3]: (warning) Member variable 'A < int >::y' is not initialized in the constructor.\n", errout.str());
|
||||
}
|
||||
|
||||
void simple7() { // ticket #4531
|
||||
|
|
Loading…
Reference in New Issue