parent
08bc369296
commit
47e9504083
|
@ -395,27 +395,27 @@ private:
|
||||||
ASSERT_EQUALS("[test.cpp:3]: (warning) Member variable 'Fred::x' is not initialized in the constructor.\n", errout.str());
|
ASSERT_EQUALS("[test.cpp:3]: (warning) Member variable 'Fred::x' is not initialized in the constructor.\n", errout.str());
|
||||||
|
|
||||||
check("class Fred {\n"
|
check("class Fred {\n"
|
||||||
"public:\n"
|
"public:\n"
|
||||||
" Fred() = default;\n"
|
" Fred() = default;\n"
|
||||||
" int x;\n"
|
" int x;\n"
|
||||||
"};");
|
"};");
|
||||||
ASSERT_EQUALS("[test.cpp:3]: (warning) Member variable 'Fred::x' is not initialized in the constructor.\n", errout.str());
|
ASSERT_EQUALS("[test.cpp:3]: (warning) Member variable 'Fred::x' is not initialized in the constructor.\n", errout.str());
|
||||||
|
|
||||||
check("class Fred {\n"
|
check("class Fred {\n"
|
||||||
"public:\n"
|
"public:\n"
|
||||||
" Fred();\n"
|
" Fred();\n"
|
||||||
" int x;\n"
|
" int x;\n"
|
||||||
"};\n"
|
"};\n"
|
||||||
"Fred::Fred()=default;");
|
"Fred::Fred()=default;");
|
||||||
ASSERT_EQUALS("[test.cpp:3]: (warning) Member variable 'Fred::x' is not initialized in the constructor.\n", errout.str());
|
ASSERT_EQUALS("[test.cpp:3]: (warning) Member variable 'Fred::x' is not initialized in the constructor.\n", errout.str());
|
||||||
|
|
||||||
check("class Fred {\n"
|
check("class Fred {\n"
|
||||||
"public:\n"
|
"public:\n"
|
||||||
" Fred() = default;\n"
|
" Fred() = default;\n"
|
||||||
"private:\n"
|
"private:\n"
|
||||||
" int x = 0;\n"
|
" int x = 0;\n"
|
||||||
"};");
|
"};");
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void simple11() { // ticket #4536, #6214
|
void simple11() { // ticket #4536, #6214
|
||||||
|
|
Loading…
Reference in New Issue