diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-11-21 15:19:45 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-11-21 15:19:45 +0100 |
commit | 7edbd99775416a32c88acf8e9379518436905f02 (patch) | |
tree | 6356edb79f846df4aa2f6a8a5ecfeef4e651bcc0 /tests/test-cpp.cpp | |
parent | 7250bbe5ae2d2ee6b0334bc462aab73f7d8dac0e (diff) |
Support gcc 10 and clang 11
Diffstat (limited to 'tests/test-cpp.cpp')
-rw-r--r-- | tests/test-cpp.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test-cpp.cpp b/tests/test-cpp.cpp index 2e1b29e..d4e8c66 100644 --- a/tests/test-cpp.cpp +++ b/tests/test-cpp.cpp @@ -34,30 +34,30 @@ TEST_F(CppTest, preprocessing_tokenize) { CPP cpp; auto pp_tokens = cpp.preprocessing_tokenize("int main() { return 1; }"); - ASSERT_EQ(pp_tokens.size(), 9); + ASSERT_EQ(pp_tokens.size(), size_t(9)); auto tokens = cpp.tokens_from_pptokens(pp_tokens); - ASSERT_EQ(tokens.size(), 9); + ASSERT_EQ(tokens.size(), size_t(9)); auto nodes = cpp.analysis(tokens); - ASSERT_EQ(nodes.size(), 43); + ASSERT_EQ(nodes.size(), size_t(43)); } TEST_F(CppTest, preprocessing_tokenize_empty) { CPP cpp; auto pp_tokens = cpp.preprocessing_tokenize(""); - ASSERT_EQ(pp_tokens.size(), 0); + ASSERT_EQ(pp_tokens.size(), size_t(0)); auto tokens = cpp.tokens_from_pptokens(pp_tokens); - ASSERT_EQ(tokens.size(), 0); + ASSERT_EQ(tokens.size(), size_t(0)); auto nodes = cpp.analysis(tokens); - ASSERT_EQ(nodes.size(), 1); + ASSERT_EQ(nodes.size(), size_t(1)); ASSERT_EQ(nodes[0].type, "translation-unit"); } @@ -68,7 +68,7 @@ TEST_F(CppTest, preprocessing_tokenize_compile_error) { auto tokens = cpp.tokens_from_pptokens(ppTree); - ASSERT_EQ(tokens.size(), 2); + ASSERT_EQ(tokens.size(), size_t(2)); try { auto nodes = cpp.analysis(tokens); |