diff options
Diffstat (limited to 'clang/unittests/Tooling/CompilationDatabaseTest.cpp')
-rw-r--r-- | clang/unittests/Tooling/CompilationDatabaseTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/unittests/Tooling/CompilationDatabaseTest.cpp b/clang/unittests/Tooling/CompilationDatabaseTest.cpp index adb9de0..8194dd3 100644 --- a/clang/unittests/Tooling/CompilationDatabaseTest.cpp +++ b/clang/unittests/Tooling/CompilationDatabaseTest.cpp @@ -836,6 +836,14 @@ TEST_F(InterpolateTest, Case) { EXPECT_EQ(getProxy("foo/bar/baz/shout.C"), "FOO/BAR/BAZ/SHOUT.cc"); } +TEST_F(InterpolateTest, LanguagePreference) { + add("foo/bar/baz/exact.C"); + add("foo/bar/baz/exact.c"); + add("other/random/path.cpp"); + // Proxies for ".H" files are ".C" files, and not ".c files". + EXPECT_EQ(getProxy("foo/bar/baz/exact.H"), "foo/bar/baz/exact.C"); +} + TEST_F(InterpolateTest, Aliasing) { add("foo.cpp", "-faligned-new"); |