Skip to content

Commit a742d6f

Browse files
committed
Fix #13944 tests
1 parent 419fc92 commit a742d6f

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

test/testother.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4664,6 +4664,24 @@ class TestOther : public TestFixture {
46644664
ASSERT_EQUALS("[test.cpp:1:18]: (style) Parameter 'p' can be declared as pointer to const [constParameterPointer]\n"
46654665
"[test.cpp:4:18]: (style) Parameter 'p' can be declared as pointer to const [constParameterPointer]\n",
46664666
errout_str());
4667+
4668+
check("class A {\n"
4669+
"public:\n"
4670+
" void func01(QPoint* pt1) {\n"
4671+
" if (nullptr == pt1) {}\n"
4672+
" }\n"
4673+
"};\n");
4674+
ASSERT_EQUALS("[test.cpp:3:25]: (style) Parameter 'pt1' can be declared as pointer to const [constParameterPointer]\n",
4675+
errout_str());
4676+
4677+
check("class B : public QObject {\n"
4678+
"public:\n"
4679+
" void func02(QPoint* pt2) {\n"
4680+
" if (nullptr == pt2) {}\n"
4681+
" }\n"
4682+
"};\n");
4683+
ASSERT_EQUALS("[test.cpp:3:25]: (style, inconclusive) Parameter 'pt2' can be declared as pointer to const [constParameterPointer]\n",
4684+
errout_str());
46674685
}
46684686

46694687
void constArray() {

0 commit comments

Comments
 (0)