Skip to content

Commit 4858a13

Browse files
committed
add test
1 parent b4a1e77 commit 4858a13

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test/testtokenize.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ class TestTokenizer : public TestFixture {
405405
TEST_CASE(astdecltypescope);
406406
TEST_CASE(astdesignatedinit);
407407
TEST_CASE(astrvaluedecl);
408+
TEST_CASE(astorkeyword);
408409

409410
TEST_CASE(startOfExecutableScope);
410411

@@ -6203,6 +6204,7 @@ class TestTokenizer : public TestFixture {
62036204
tokenizer.simplifySpaceshipOperator();
62046205
tokenizer.createLinks();
62056206
tokenizer.createLinks2();
6207+
tokenizer.simplifyCAlternativeTokens();
62066208
tokenizer.list.front()->assignIndexes();
62076209

62086210
// set varid..
@@ -7186,6 +7188,10 @@ class TestTokenizer : public TestFixture {
71867188
ASSERT_EQUALS("varstdmove::var(=", testAst("std::string&& var = std::move(var);"));
71877189
}
71887190

7191+
void astorkeyword() {
7192+
ASSERT_EQUALS("ifsp.\"\"==sp.0==||(", testAst("void f() { if (s.p == \"\" or s.p == 0) {} }"));
7193+
}
7194+
71897195
#define isStartOfExecutableScope(offset, code) isStartOfExecutableScope_(offset, code, __FILE__, __LINE__)
71907196
template<size_t size>
71917197
bool isStartOfExecutableScope_(int offset, const char (&code)[size], const char* file, int line) {

0 commit comments

Comments
 (0)