aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/unittest/data/highlightingmarks.cpp2
-rw-r--r--tests/unit/unittest/gtest-creator-printing.cpp1
-rw-r--r--tests/unit/unittest/tokenprocessor-test.cpp7
3 files changed, 10 insertions, 0 deletions
diff --git a/tests/unit/unittest/data/highlightingmarks.cpp b/tests/unit/unittest/data/highlightingmarks.cpp
index f3b624f320..8221afc29f 100644
--- a/tests/unit/unittest/data/highlightingmarks.cpp
+++ b/tests/unit/unittest/data/highlightingmarks.cpp
@@ -769,3 +769,5 @@ template<typename T>
void func(T v) {
GlobalVar = 5;
}
+
+static std::vector<std::pair<int, int>> pv;
diff --git a/tests/unit/unittest/gtest-creator-printing.cpp b/tests/unit/unittest/gtest-creator-printing.cpp
index cc10dcfa9d..2f0afc841c 100644
--- a/tests/unit/unittest/gtest-creator-printing.cpp
+++ b/tests/unit/unittest/gtest-creator-printing.cpp
@@ -868,6 +868,7 @@ static const char *highlightingTypeToCStringLiteral(HighlightingType type)
RETURN_TEXT_FOR_CASE(TemplateTemplateParameter);
RETURN_TEXT_FOR_CASE(AngleBracketOpen);
RETURN_TEXT_FOR_CASE(AngleBracketClose);
+ RETURN_TEXT_FOR_CASE(DoubleAngleBracketClose);
RETURN_TEXT_FOR_CASE(TernaryIf);
RETURN_TEXT_FOR_CASE(TernaryElse);
}
diff --git a/tests/unit/unittest/tokenprocessor-test.cpp b/tests/unit/unittest/tokenprocessor-test.cpp
index 94e1b83b15..562f852abe 100644
--- a/tests/unit/unittest/tokenprocessor-test.cpp
+++ b/tests/unit/unittest/tokenprocessor-test.cpp
@@ -1794,6 +1794,13 @@ TEST_F(TokenProcessor, TemplateSeparateDeclDef)
ASSERT_THAT(infos[37], IsHighlightingMark(764u, 5u, 9u, HighlightingType::GlobalVariable));
}
+TEST_F(TokenProcessor, NestedTemplate)
+{
+ const auto infos = translationUnit.tokenInfosInRange(sourceRange(773, 44));
+ ASSERT_THAT(infos[12], HasTwoTypes(HighlightingType::Punctuation,
+ HighlightingType::DoubleAngleBracketClose));
+}
+
Data *TokenProcessor::d;
void TokenProcessor::SetUpTestCase()