Improve coverage for operator= return type detection.
This adds a testcase with parameter being a reference to non-const.
This commit is contained in:
parent
bb20c0504e
commit
6cfcf8610d
|
@ -772,6 +772,14 @@ private:
|
|||
"};");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
checkOpertorEq("class A\n"
|
||||
"{\n"
|
||||
"public:\n"
|
||||
" void goo() {}"
|
||||
" void operator=(A&);\n"
|
||||
"};");
|
||||
ASSERT_EQUALS("[test.cpp:4]: (style) 'A::operator=' should return 'A &'.\n", errout.str());
|
||||
|
||||
checkOpertorEq("class A\n"
|
||||
"{\n"
|
||||
"private:\n"
|
||||
|
|
Loading…
Reference in New Issue