Skip to content

Commit 3a18138

Browse files
committed
Fix #13944 tests
1 parent 6c32577 commit 3a18138

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/testother.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4676,6 +4676,24 @@ class TestOther : public TestFixture {
46764676
ASSERT_EQUALS("[test.cpp:1:18]: (style) Parameter 'p' can be declared as pointer to const [constParameterPointer]\n"
46774677
"[test.cpp:4:18]: (style) Parameter 'p' can be declared as pointer to const [constParameterPointer]\n",
46784678
errout_str());
4679+
4680+
check("class A {\n"
4681+
"public:\n"
4682+
" void func01(QPoint* pt1) {\n"
4683+
" if (nullptr == pt1) {}\n"
4684+
" }\n"
4685+
"};\n");
4686+
ASSERT_EQUALS("[test.cpp:3:25]: (style) Parameter 'pt1' can be declared as pointer to const [constParameterPointer]\n",
4687+
errout_str());
4688+
4689+
check("class B : public QObject {\n"
4690+
"public:\n"
4691+
" void func02(QPoint* pt2) {\n"
4692+
" if (nullptr == pt2) {}\n"
4693+
" }\n"
4694+
"};\n");
4695+
ASSERT_EQUALS("[test.cpp:3:25]: (style, inconclusive) Parameter 'pt2' can be declared as pointer to const [constParameterPointer]\n",
4696+
errout_str());
46794697
}
46804698

46814699
void constArray() {

0 commit comments

Comments
 (0)