diff options
Diffstat (limited to 'tests/unit/unittest/includecollector-test.cpp')
-rw-r--r-- | tests/unit/unittest/includecollector-test.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/unit/unittest/includecollector-test.cpp b/tests/unit/unittest/includecollector-test.cpp index 8de9c04f78..eacfbcebb7 100644 --- a/tests/unit/unittest/includecollector-test.cpp +++ b/tests/unit/unittest/includecollector-test.cpp @@ -87,6 +87,16 @@ TEST_F(IncludeCollector, IncludesAreSorted) ElementsAre(0, 1, 2)); } +TEST_F(IncludeCollector, If) +{ + emptyCollector.addFile(TESTDATA_DIR, "includecollector_if.cpp", "", {"cc", "includecollector_if.cpp"}); + + emptyCollector.collectIncludes(); + + ASSERT_THAT(emptyCollector.takeIncludeIds(), + ElementsAre(id(TESTDATA_DIR "/includecollector_true.h"))); +} + TEST_F(IncludeCollector, LocalPath) { emptyCollector.addFile(TESTDATA_DIR, "includecollector_main.cpp", "", {"cc", "includecollector_main.cpp"}); |