summaryrefslogtreecommitdiff
path: root/tests/unit/unittest/tokenprocessor-test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/unittest/tokenprocessor-test.cpp')
-rw-r--r--tests/unit/unittest/tokenprocessor-test.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/unit/unittest/tokenprocessor-test.cpp b/tests/unit/unittest/tokenprocessor-test.cpp
index 3383c9a3b9..8d79bc95cb 100644
--- a/tests/unit/unittest/tokenprocessor-test.cpp
+++ b/tests/unit/unittest/tokenprocessor-test.cpp
@@ -1704,6 +1704,24 @@ TEST_F(TokenProcessor, LambdaLocalVariableCapture)
ASSERT_THAT(infos[4], HasOnlyType(HighlightingType::LocalVariable));
}
+TEST_F(TokenProcessor, StaticProtectedMember)
+{
+ const auto infos = translationUnit.fullTokenInfosInRange(sourceRange(693, 31));
+
+ ClangBackEnd::TokenInfoContainer container(infos[2]);
+
+ ASSERT_THAT(container.extraInfo.accessSpecifier, ClangBackEnd::AccessSpecifier::Protected);
+}
+
+TEST_F(TokenProcessor, StaticPrivateMember)
+{
+ const auto infos = translationUnit.fullTokenInfosInRange(sourceRange(696, 29));
+
+ ClangBackEnd::TokenInfoContainer container(infos[2]);
+
+ ASSERT_THAT(container.extraInfo.accessSpecifier, ClangBackEnd::AccessSpecifier::Private);
+}
+
Data *TokenProcessor::d;
void TokenProcessor::SetUpTestCase()