Skip to content

Commit 315ce2e

Browse files
committed
test
1 parent bcee906 commit 315ce2e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎test/testtokenize.cpp‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ class TestTokenizer : public TestFixture {
490490
TEST_CASE(checkConfiguration);
491491

492492
TEST_CASE(unknownMacroBeforeReturn);
493+
TEST_CASE(unknownMacroBracedArgument);
493494

494495
TEST_CASE(cppKeywordInCSource);
495496

@@ -8853,6 +8854,12 @@ class TestTokenizer : public TestFixture {
88538854
ASSERT_THROW_INTERNAL(tokenizeAndStringify("int f() { X return 0; }\n"), UNKNOWN_MACRO);
88548855
}
88558856

8857+
void unknownMacroBracedArgument() {
8858+
ASSERT_THROW_INTERNAL_EQUALS(tokenizeAndStringify("F(a, { float y = p.y; return 0 });\n"),
8859+
UNKNOWN_MACRO,
8860+
"There is an unknown macro here somewhere. Configuration is required. If F is a macro then please configure it.");
8861+
}
8862+
88568863
void cppKeywordInCSource() {
88578864
ASSERT_NO_THROW(tokenizeAndStringify("int throw() {}\n", dinit(TokenizeOptions, $.cpp = false)));
88588865

0 commit comments

Comments
 (0)