summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-11-09 16:55:10 +0100
committerRoland Reichwein <mail@reichwein.it>2020-11-09 16:55:10 +0100
commit8f2e3e7af0360cca7f8918ae41cc573f8cd88d7f (patch)
treed75230f12d1c25105aa68f96ce5759b8a547a2a2 /tests
parentfe063834e53e856823b9a42ad3a5e04153446849 (diff)
Support empty translation unit
Diffstat (limited to 'tests')
-rw-r--r--tests/test-cpp.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test-cpp.cpp b/tests/test-cpp.cpp
index 0a0276e..e80f2d6 100644
--- a/tests/test-cpp.cpp
+++ b/tests/test-cpp.cpp
@@ -57,7 +57,9 @@ TEST_F(CppTest, preprocessing_tokenize_empty) {
auto nodes = cpp.analysis(tokens);
- ASSERT_EQ(nodes.size(), 0);
+ ASSERT_EQ(nodes.size(), 1);
+
+ ASSERT_EQ(nodes[0].type, "translation-unit");
}
TEST_F(CppTest, preprocessing_tokenize_compile_error) {