Skip to content

Commit

Permalink
Update testsimplifytypedef.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jun 12, 2024
1 parent 23a53d6 commit 42cd225
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/testsimplifytypedef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ class TestSimplifyTypedef : public TestFixture {
TEST_CASE(simplifyTypedef152);
TEST_CASE(simplifyTypedef153);
TEST_CASE(simplifyTypedef154);
TEST_CASE(simplifyTypedef155);

TEST_CASE(simplifyTypedefFunction1);
TEST_CASE(simplifyTypedefFunction2); // ticket #1685
Expand Down Expand Up @@ -3614,6 +3615,15 @@ class TestSimplifyTypedef : public TestFixture {
ASSERT_EQUALS(exp, tok(code));
}

void simplifyTypedef155() {
const char code[] = "typedef struct S T;\n" // #12808
"typedef struct S { int i; } T;\n"
"extern \"C\" void f(T* t);\n";
const char exp[] = "struct S { int i ; } ; "
"void f ( struct S * t ) ;";
ASSERT_EQUALS(exp, tok(code));
}

void simplifyTypedefFunction1() {
{
const char code[] = "typedef void (*my_func)();\n"
Expand Down

0 comments on commit 42cd225

Please sign in to comment.