forked from qt-creator/qt-creator
ClangCodeModel: Support "parentheses" matching for ternary operator
That is, show which ":" belongs to which "?" when the cursor is on one of them. Fixes: QTCREATORBUG-1410 Change-Id: Ie19360b3dfc82d92c264d99a5aa1864eda66e5c8 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -851,7 +851,8 @@ TEST_F(TokenProcessor, OperatorColon)
|
||||
{
|
||||
const auto infos = translationUnit.tokenInfosInRange(sourceRange(668, 28));
|
||||
|
||||
ASSERT_THAT(infos[6], HasTwoTypes(HighlightingType::Punctuation, HighlightingType::Operator));
|
||||
ASSERT_THAT(infos[6], HasThreeTypes(HighlightingType::Punctuation, HighlightingType::Operator,
|
||||
HighlightingType::TernaryElse));
|
||||
}
|
||||
|
||||
TEST_F(TokenProcessor, PunctuationColon)
|
||||
|
||||
Reference in New Issue
Block a user