Skip to content

Commit 2b2efb0

Browse files
committed
testclangimport: move nullNodeInvalidLevel after crash()
Signed-off-by: nussaiba shaikh <nussaibah@bugqore.com>
1 parent 4fb0899 commit 2b2efb0

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎test/testclangimport.cpp‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,6 @@ class TestClangImport : public TestFixture {
142142
TEST_CASE(nullNodeInvalidLevel);
143143
}
144144

145-
void nullNodeInvalidLevel() {
146-
// a "<<<NULL>>>" line whose indentation maps to level 0 must not index tree[-1]
147-
const char* clang = "`-FunctionDecl 0x1 <a.cpp:1:1, col:34> col:6 foo 'void ()'\n"
148-
"`-<<<NULL>>>\n";
149-
ASSERT_EQUALS("void foo ( ) ;", parse(clang));
150-
}
151-
152145
std::string parse(const char clang[]) {
153146
const Settings settings = settingsBuilder().clang().build();
154147
TokenList tokenlist{settings, Standards::Language::CPP};
@@ -1380,6 +1373,13 @@ class TestClangImport : public TestFixture {
13801373
" `-CompoundStmt 0x5603791b5700 <col:54, col:55>\n";
13811374
(void)parse(clang); // don't crash
13821375
}
1376+
1377+
void nullNodeInvalidLevel() {
1378+
// a "<<<NULL>>>" line whose indentation maps to level 0 must not index tree[-1]
1379+
const char* clang = "`-FunctionDecl 0x1 <a.cpp:1:1, col:34> col:6 foo 'void ()'\n"
1380+
"`-<<<NULL>>>\n";
1381+
ASSERT_EQUALS("void foo ( ) ;", parse(clang));
1382+
}
13831383
};
13841384

13851385
REGISTER_TEST(TestClangImport)

0 commit comments

Comments
 (0)