Skip to content

Commit 49b8c2a

Browse files
Add test for #12041 (#8626)
1 parent e1053db commit 49b8c2a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/testsimplifytypedef.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ class TestSimplifyTypedef : public TestFixture {
232232
TEST_CASE(simplifyTypedef159);
233233
TEST_CASE(simplifyTypedef160);
234234
TEST_CASE(simplifyTypedef161);
235+
TEST_CASE(simplifyTypedef162);
235236

236237
TEST_CASE(simplifyTypedefFunction1);
237238
TEST_CASE(simplifyTypedefFunction2); // ticket #1685
@@ -3859,6 +3860,14 @@ class TestSimplifyTypedef : public TestFixture {
38593860
TODO_ASSERT_EQUALS(exp2, cur2, tok(code2));
38603861
}
38613862

3863+
void simplifyTypedef162() {
3864+
const char code[] = "using std::vector;\n" // #12041
3865+
"typedef vector<int> ints;\n"
3866+
"void f(ints v);\n";
3867+
const char exp[] = "void f ( std :: vector < int > v ) ;";
3868+
ASSERT_EQUALS(exp, tok(code));
3869+
}
3870+
38623871
void simplifyTypedefFunction1() {
38633872
{
38643873
const char code[] = "typedef void (*my_func)();\n"

0 commit comments

Comments
 (0)