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());
|
||||
|
||||
check("class Fred {\n"
|
||||
"public:\n"
|
||||
" Fred() = default;\n"
|
||||
" int x;\n"
|
||||
"};");
|
||||
"public:\n"
|
||||
" Fred() = default;\n"
|
||||
" int x;\n"
|
||||
"};");
|
||||
ASSERT_EQUALS("[test.cpp:3]: (warning) Member variable 'Fred::x' is not initialized in the constructor.\n", errout.str());
|
||||
|
||||
check("class Fred {\n"
|
||||
"public:\n"
|
||||
" Fred();\n"
|
||||
" int x;\n"
|
||||
"};\n"
|
||||
"Fred::Fred()=default;");
|
||||
"public:\n"
|
||||
" Fred();\n"
|
||||
" int x;\n"
|
||||
"};\n"
|
||||
"Fred::Fred()=default;");
|
||||
ASSERT_EQUALS("[test.cpp:3]: (warning) Member variable 'Fred::x' is not initialized in the constructor.\n", errout.str());
|
||||
|
||||
check("class Fred {\n"
|
||||
"public:\n"
|
||||
" Fred() = default;\n"
|
||||
"private:\n"
|
||||
" int x = 0;\n"
|
||||
"};");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
check("class Fred {\n"
|
||||
"public:\n"
|
||||
" Fred() = default;\n"
|
||||
"private:\n"
|
||||
" int x = 0;\n"
|
||||
"};");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void simple11() { // ticket #4536, #6214
|
||||
|
|
Loading…
Reference in New Issue