File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ class TestSimplifyTypedef : public TestFixture {
223
223
TEST_CASE (simplifyTypedef155);
224
224
TEST_CASE (simplifyTypedef156);
225
225
TEST_CASE (simplifyTypedef157);
226
+ TEST_CASE (simplifyTypedef158);
226
227
227
228
TEST_CASE (simplifyTypedefFunction1);
228
229
TEST_CASE (simplifyTypedefFunction2); // ticket #1685
@@ -3773,6 +3774,16 @@ class TestSimplifyTypedef : public TestFixture {
3773
3774
ASSERT_EQUALS (exp, tok (code));
3774
3775
}
3775
3776
3777
+ void simplifyTypedef158 () {
3778
+ const char code[] = " void f() {\n "
3779
+ " typedef const char* const triple[3];\n "
3780
+ " static const triple data[] = { {\" a\" , \" b\" , \" c\" } };\n "
3781
+ " }\n " ;
3782
+ const char exp[] = " void f ( ) { static const char * const data [ ] [ 3 ] = { { \" a\" , \" b\" , \" c\" } } ; }" ;
3783
+ const char cur[] = " void f ( ) { static const char * const const data [ ] [ 3 ] = { { \" a\" , \" b\" , \" c\" } } ; }" ;
3784
+ TODO_ASSERT_EQUALS (exp, cur, tok (code));
3785
+ }
3786
+
3776
3787
void simplifyTypedefFunction1 () {
3777
3788
{
3778
3789
const char code[] = " typedef void (*my_func)();\n "
You can’t perform that action at this time.
0 commit comments