Skip to content

Commit d8c7a85

Browse files
Update testclass.cpp
1 parent 4aa87ff commit d8c7a85

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

test/testclass.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6824,9 +6824,15 @@ class TestClass : public TestFixture {
68246824

68256825
checkConst("struct S {\n" // #12162
68266826
" bool has(int i) { return m.find(i) != m.end(); }\n"
6827+
" bool isZero(int i) { return m.at(i) == 0; }\n"
6828+
" bool isZero() { return v.front() == 0; }\n"
6829+
" void set(int i) { m.at(i) = 0; }\n"
68276830
" std::map<int, int> m;\n"
6831+
" std::vector<int> v;\n"
68286832
"};\n");
6829-
ASSERT_EQUALS("[test.cpp:2:10]: (style, inconclusive) Technically the member function 'S::has' can be const. [functionConst]\n",
6833+
ASSERT_EQUALS("[test.cpp:2:10]: (style, inconclusive) Technically the member function 'S::has' can be const. [functionConst]\n"
6834+
"[test.cpp:3:10]: (style, inconclusive) Technically the member function 'S::isZero' can be const. [functionConst]\n"
6835+
"[test.cpp:4:10]: (style, inconclusive) Technically the member function 'S::isZero' can be const. [functionConst]\n",
68306836
errout_str());
68316837
}
68326838

0 commit comments

Comments
 (0)