Skip to content

Commit abb2266

Browse files
Update testtokenize.cpp
1 parent d7c9b40 commit abb2266

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
@@ -2857,6 +2857,7 @@ class TestTokenizer : public TestFixture {
28572857
ASSERT_EQUALS("enum Anonymous0 { E } ; static enum Anonymous0 const * f ( ) { return NULL ; }", tokenizeAndStringify(code, dinit(TokenizeOptions, $.cpp = false)));
28582858
}
28592859
}
2860+
28602861
void vardecl35() { // #14842
28612862
{
28622863
const char code[] = "auto f() -> void {\n"
@@ -2869,6 +2870,18 @@ class TestTokenizer : public TestFixture {
28692870
"}", tokenizeAndStringify(code));
28702871
ignore_errout();
28712872
}
2873+
{
2874+
const char code[] = "auto f() -> ::std::vector<int> {\n"
2875+
" int i = 0;\n"
2876+
" return { i };\n"
2877+
"}";
2878+
ASSERT_EQUALS("auto f ( ) . :: std :: vector < int > {\n"
2879+
"int i ; i = 0 ;\n"
2880+
"return { i } ;\n"
2881+
"}",
2882+
tokenizeAndStringify(code));
2883+
ignore_errout();
2884+
}
28722885
}
28732886

28742887
void volatile_variables() {

0 commit comments

Comments
 (0)