Skip to content

Commit 4cb1981

Browse files
Update testtokenize.cpp
1 parent dd026a4 commit 4cb1981

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

test/testtokenize.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8336,8 +8336,10 @@ class TestTokenizer : public TestFixture {
83368336
const char code[] = "void requires(const char*);\n" // #14613
83378337
"void f() { requires(\"abc\"); }\n";
83388338
ASSERT_NO_THROW(tokenizeAndStringify(code, dinit(TokenizeOptions, $.cpp = false)));
8339-
ASSERT_NO_THROW(tokenizeAndStringify(code, dinit(TokenizeOptions, $.cpp = true, $.cppstd = Standards::CPP17)));
8340-
ASSERT_THROW_INTERNAL(tokenizeAndStringify(code, dinit(TokenizeOptions, $.cpp = true, $.cppstd = Standards::CPP20)), AST);
8339+
const Settings s_cpp17 = settingsBuilder().cpp(Standards::CPP17).build();
8340+
ASSERT_NO_THROW(tokenizeAndStringify(code, s_cpp17, true));
8341+
const Settings s_cpp20 = settingsBuilder().cpp(Standards::CPP20).build();
8342+
ASSERT_THROW_INTERNAL(tokenizeAndStringify(code, s_cpp20, true), AST);
83418343
}
83428344

83438345
void cppcast() {

0 commit comments

Comments
 (0)