forked from qt-creator/qt-creator
Clang: Support old-style SIGNAL/SLOT macro
Color types and enable Ctrl+click for the functions and types inside SIGNAL/SLOT macros. Change-Id: Ic1c0b7372fe9a73c5607b1973d75a6656c75ef0e Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -1535,6 +1535,7 @@ TEST_F(TokenProcessor, QtPropertyName)
|
||||
{
|
||||
const auto infos = translationUnit.fullTokenInfosInRange(sourceRange(599, 103));
|
||||
|
||||
ASSERT_THAT(infos[0], HasOnlyType(HighlightingType::PreprocessorExpansion));
|
||||
ASSERT_THAT(infos[8], HasOnlyType(HighlightingType::QtProperty));
|
||||
}
|
||||
|
||||
@@ -1614,6 +1615,35 @@ TEST_F(TokenProcessor, LexicalParentIndex)
|
||||
ASSERT_THAT(containers[3].extraInfo.lexicalParentIndex, 1);
|
||||
}
|
||||
|
||||
TEST_F(TokenProcessor, QtOldStyleSignal)
|
||||
{
|
||||
const auto infos = translationUnit.fullTokenInfosInRange(sourceRange(672, 32));
|
||||
|
||||
ASSERT_THAT(infos[0], HasOnlyType(HighlightingType::PreprocessorExpansion));
|
||||
ASSERT_THAT(infos[2], HasOnlyType(HighlightingType::Function));
|
||||
ASSERT_THAT(infos[4], HasOnlyType(HighlightingType::Type));
|
||||
}
|
||||
|
||||
TEST_F(TokenProcessor, QtOldStyleSlot)
|
||||
{
|
||||
const auto infos = translationUnit.fullTokenInfosInRange(sourceRange(673, 30));
|
||||
|
||||
ASSERT_THAT(infos[0], HasOnlyType(HighlightingType::PreprocessorExpansion));
|
||||
ASSERT_THAT(infos[2], HasOnlyType(HighlightingType::Function));
|
||||
ASSERT_THAT(infos[4], HasOnlyType(HighlightingType::Type));
|
||||
}
|
||||
|
||||
TEST_F(TokenProcessor, QtOldStyleSignalFunctionPointerType)
|
||||
{
|
||||
const auto infos = translationUnit.fullTokenInfosInRange(sourceRange(674, 50));
|
||||
|
||||
ASSERT_THAT(infos[0], HasOnlyType(HighlightingType::PreprocessorExpansion));
|
||||
ASSERT_THAT(infos[2], HasOnlyType(HighlightingType::Function));
|
||||
ASSERT_THAT(infos[4], HasOnlyType(HighlightingType::Type));
|
||||
ASSERT_THAT(infos[7], HasOnlyType(HighlightingType::Type));
|
||||
ASSERT_THAT(infos[10], HasOnlyType(HighlightingType::Type));
|
||||
}
|
||||
|
||||
Data *TokenProcessor::d;
|
||||
|
||||
void TokenProcessor::SetUpTestCase()
|
||||
|
||||
Reference in New Issue
Block a user