Improve coverage for operator= return type detection.

This adds a testcase with parameter being a reference to non-const.
This commit is contained in:
Dmitry-Me 2017-09-14 00:12:10 +03:00
parent bb20c0504e
commit 6cfcf8610d
1 changed files with 8 additions and 0 deletions

View File

@ -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"