const functions: Added unit test for ticket #2003

This commit is contained in:
Robert Reif 2010-09-01 06:18:09 +02:00 committed by Daniel Marjamäki
parent 63f1de509c
commit e39dda4eed
1 changed files with 14 additions and 0 deletions

View File

@ -141,6 +141,7 @@ private:
TEST_CASE(const33);
TEST_CASE(const34); // ticket #1964
TEST_CASE(const35); // ticket #2001
TEST_CASE(const36); // ticket #2003
TEST_CASE(constoperator1); // operator< can often be const
TEST_CASE(constoperator2); // operator<<
TEST_CASE(constoperator3);
@ -3952,6 +3953,19 @@ private:
ASSERT_EQUALS("[test.cpp:12]: (style) The function 'N::Derived::getResourceName' can be const\n", errout.str());
}
void const36() // ticket #2003
{
checkConst("class Foo {\n"
"public:\n"
" Blue::Utility::Size m_MaxQueueSize;\n"
" void SetMaxQueueSize(Blue::Utility::Size a_MaxQueueSize)\n"
" {\n"
" m_MaxQueueSize = a_MaxQueueSize;\n"
" }\n"
"}\n");
ASSERT_EQUALS("", errout.str());
}
// increment/decrement => not const
void constincdec()
{