Skip to content

Commit 4d23f2b

Browse files
committed
Add test for 14444
1 parent 0c2b64b commit 4d23f2b

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
@@ -423,6 +423,7 @@ class TestTokenizer : public TestFixture {
423423
TEST_CASE(astdesignatedinit);
424424
TEST_CASE(astrvaluedecl);
425425
TEST_CASE(astorkeyword);
426+
TEST_CASE(astenumdecl);
426427

427428
TEST_CASE(startOfExecutableScope);
428429

@@ -7389,6 +7390,11 @@ class TestTokenizer : public TestFixture {
73897390
ASSERT_EQUALS("ifsp.\"\"==sp.0==||(", testAst("void f() { if (s.p == \"\" or s.p == 0) {} }"));
73907391
}
73917392

7393+
void astenumdecl() {
7394+
ASSERT_EQUALS("A0U=", testAst("enum class myclass : unsigned char { A = 0U, };"));
7395+
ASSERT_EQUALS("A0U=", testAst("enum myclass : unsigned char { A = 0U, };"));
7396+
}
7397+
73927398
#define isStartOfExecutableScope(offset, code) isStartOfExecutableScope_(offset, code, __FILE__, __LINE__)
73937399
template<size_t size>
73947400
bool isStartOfExecutableScope_(int offset, const char (&code)[size], const char* file, int line) {

0 commit comments

Comments
 (0)