aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/unittest/diagnostic-test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/unittest/diagnostic-test.cpp')
-rw-r--r--tests/unit/unittest/diagnostic-test.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/unit/unittest/diagnostic-test.cpp b/tests/unit/unittest/diagnostic-test.cpp
index 3ab382c46b..adfc503d3e 100644
--- a/tests/unit/unittest/diagnostic-test.cpp
+++ b/tests/unit/unittest/diagnostic-test.cpp
@@ -123,7 +123,11 @@ TEST_F(DiagnosticSlowTest, MoveSelfAssigment)
TEST_F(DiagnosticSlowTest, Text)
{
+#if CINDEX_VERSION_MAJOR == 0 && CINDEX_VERSION_MINOR >= 59 // >= LLVM/Clang 10
+ ASSERT_THAT(diagnostic.text(), Utf8StringLiteral("warning: non-void function does not return a value"));
+#else
ASSERT_THAT(diagnostic.text(), Utf8StringLiteral("warning: control reaches end of non-void function"));
+#endif
}
TEST_F(DiagnosticSlowTest, Category)