@@ -234,15 +234,15 @@ class TestTokenizer : public TestFixture {
234234 TEST_CASE (switchCase);
235235
236236 TEST_CASE (simplifyPointerToStandardType);
237- TEST_CASE (functionpointer1 );
238- TEST_CASE (functionpointer2 );
239- TEST_CASE (functionpointer3 );
240- TEST_CASE (functionpointer4 );
241- TEST_CASE (functionpointer5 );
242- TEST_CASE (functionpointer6 );
243- TEST_CASE (functionpointer7 );
244- TEST_CASE (functionpointer8 ); // #7410 - throw
245- TEST_CASE (functionpointer9 ); // #6113 - function call with function pointer
237+ TEST_CASE (simplifyFunctionPointers1 );
238+ TEST_CASE (simplifyFunctionPointers2 );
239+ TEST_CASE (simplifyFunctionPointers3 );
240+ TEST_CASE (simplifyFunctionPointers4 );
241+ TEST_CASE (simplifyFunctionPointers5 );
242+ TEST_CASE (simplifyFunctionPointers6 );
243+ TEST_CASE (simplifyFunctionPointers7 );
244+ TEST_CASE (simplifyFunctionPointers8 ); // #7410 - throw
245+ TEST_CASE (simplifyFunctionPointers9 ); // #6113 - function call with function pointer
246246
247247 TEST_CASE (removedeclspec);
248248 TEST_CASE (removeattribute);
@@ -3153,14 +3153,14 @@ class TestTokenizer : public TestFixture {
31533153 tokenizeAndStringify (" foo data[100]; something(&foo[0]);" ));
31543154 }
31553155
3156- void functionpointer1 () {
3156+ void simplifyFunctionPointers1 () {
31573157 ASSERT_EQUALS (" void ( * f ) ( ) ;" , tokenizeAndStringify (" void (*f)();" ));
31583158 ASSERT_EQUALS (" void * ( * f ) ( ) ;" , tokenizeAndStringify (" void *(*f)();" ));
31593159 ASSERT_EQUALS (" unsigned int ( * f ) ( ) ;" , tokenizeAndStringify (" unsigned int (*f)();" ));
31603160 ASSERT_EQUALS (" unsigned int * ( * f ) ( ) ;" , tokenizeAndStringify (" unsigned int * (*f)();" ));
31613161 }
31623162
3163- void functionpointer2 () {
3163+ void simplifyFunctionPointers2 () {
31643164 const char code[] = " typedef void (* PF)();"
31653165 " void f1 ( ) { }"
31663166 " PF pf = &f1;"
@@ -3171,7 +3171,7 @@ class TestTokenizer : public TestFixture {
31713171 ASSERT_EQUALS (expected, tokenizeAndStringify (code));
31723172 }
31733173
3174- void functionpointer3 () {
3174+ void simplifyFunctionPointers3 () {
31753175 // Related with ticket #2873
31763176 const char code[] = " void f() {\n "
31773177 " (void)(xy(*p)(0);)"
@@ -3182,7 +3182,7 @@ class TestTokenizer : public TestFixture {
31823182 ASSERT_EQUALS (expected, tokenizeAndStringify (code));
31833183 }
31843184
3185- void functionpointer4 () {
3185+ void simplifyFunctionPointers4 () {
31863186 const char code[] = " struct S\n "
31873187 " {\n "
31883188 " typedef void (*FP)();\n "
@@ -3196,13 +3196,13 @@ class TestTokenizer : public TestFixture {
31963196 ASSERT_EQUALS (expected, tokenizeDebugListing (code));
31973197 }
31983198
3199- void functionpointer5 () {
3199+ void simplifyFunctionPointers5 () {
32003200 const char code[] = " ;void (*fp[])(int a) = {0,0,0};" ;
32013201 const char expected[] = " 1: ; void ( * fp@1 [ ] ) ( ) = { 0 , 0 , 0 } ;\n " ; // TODO: Array dimension
32023202 ASSERT_EQUALS (expected, tokenizeDebugListing (code));
32033203 }
32043204
3205- void functionpointer6 () {
3205+ void simplifyFunctionPointers6 () {
32063206 const char code1[] = " void (*fp(void))(int) {}" ;
32073207 const char expected1[] = " 1: void * fp ( void ) { }\n " ;
32083208 ASSERT_EQUALS (expected1, tokenizeDebugListing (code1));
@@ -3212,19 +3212,19 @@ class TestTokenizer : public TestFixture {
32123212 ASSERT_EQUALS (expected2, tokenizeDebugListing (code2));
32133213 }
32143214
3215- void functionpointer7 () {
3215+ void simplifyFunctionPointers7 () {
32163216 const char code1[] = " void (X::*y)();" ;
32173217 const char expected1[] = " 1: void ( * y@1 ) ( ) ;\n " ;
32183218 ASSERT_EQUALS (expected1, tokenizeDebugListing (code1));
32193219 }
32203220
3221- void functionpointer8 () {
3221+ void simplifyFunctionPointers8 () {
32223222 const char code1[] = " int (*f)() throw(int);" ;
32233223 const char expected1[] = " 1: int ( * f@1 ) ( ) ;\n " ;
32243224 ASSERT_EQUALS (expected1, tokenizeDebugListing (code1));
32253225 }
32263226
3227- void functionpointer9 () { // function call with function pointer
3227+ void simplifyFunctionPointers9 () { // function call with function pointer
32283228 const char code1[] = " int f() { (*f)(); }" ;
32293229 const char expected1[] = " 1: int f ( ) { ( * f ) ( ) ; }\n " ;
32303230 ASSERT_EQUALS (expected1, tokenizeDebugListing (code1));
0 commit comments