Improve test coverage for postfix increment of raw pointers
This commit is contained in:
parent
78b4485670
commit
b14a976c6c
|
@ -54,6 +54,7 @@ private:
|
|||
TEST_CASE(testvolatile);
|
||||
TEST_CASE(testiterator);
|
||||
TEST_CASE(test2168);
|
||||
TEST_CASE(pointerSimplest);
|
||||
TEST_CASE(pointer); // #2321 - postincrement of pointer is OK
|
||||
TEST_CASE(testtemplate); // #4686
|
||||
TEST_CASE(testmember);
|
||||
|
@ -314,6 +315,14 @@ private:
|
|||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void pointerSimplest() {
|
||||
check("void f(int* p){\n"
|
||||
" p++;\n"
|
||||
" std::cout << *p;\n"
|
||||
"}");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void pointer() {
|
||||
check("static struct class * ab;\n"
|
||||
"int * p;\n"
|
||||
|
|
Loading…
Reference in New Issue