Skip to content

Commit 21da1f0

Browse files
Add test for #8789 (#9022)
1 parent ada0dfd commit 21da1f0

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎test/testtokenize.cpp‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5453,6 +5453,19 @@ class TestTokenizer : public TestFixture {
54535453
ASSERT_EQUALS("void search ( ) ;\nvoid dostuff ( ) { search ( ) ; }", tokenizeAndStringify(code));
54545454
}
54555455

5456+
{
5457+
const char code[] = "using namespace std;\n" // #8789
5458+
"void f(int* p, int* q) {\n"
5459+
" search(p, q, p);\n"
5460+
" search(p, q, p, q);\n"
5461+
"}\n";
5462+
ASSERT_EQUALS("void f ( int * p , int * q ) {\n"
5463+
"search ( p , q , p ) ;\n"
5464+
"std :: search ( p , q , p , q ) ;\n"
5465+
"}",
5466+
tokenizeAndStringify(code));
5467+
}
5468+
54565469
{
54575470
const char code[] = "using namespace std;\n"
54585471
"void foo() {map(a, b); }\n"; // That's obviously not std::map<>

0 commit comments

Comments
 (0)