Unit-tests: Fix compilation and failing tests

Change-Id: I061dbd01e3838721e259df619016be1fc66987b0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-07-11 10:51:33 +02:00
parent ba70df8be7
commit 391c68cddc
2 changed files with 78 additions and 5 deletions

View File

@@ -959,7 +959,8 @@ TEST_F(TokenProcessor, TemplateTypeParameter)
{
const auto infos = translationUnit.tokenInfosInRange(sourceRange(265, 135));
ASSERT_THAT(infos[3], HasOnlyType(HighlightingType::Type));
ASSERT_THAT(infos[3], HasTwoTypes(HighlightingType::Type,
HighlightingType::TemplateTypeParameter));
}
TEST_F(TokenProcessor, TemplateDefaultParameter)
@@ -987,7 +988,8 @@ TEST_F(TokenProcessor, TemplateTemplateParameter)
{
const auto infos = translationUnit.tokenInfosInRange(sourceRange(265, 135));
ASSERT_THAT(infos[17], HasOnlyType(HighlightingType::Type));
ASSERT_THAT(infos[17], HasTwoTypes(HighlightingType::Type,
HighlightingType::TemplateTemplateParameter));
}
TEST_F(TokenProcessor, TemplateTemplateParameterDefaultArgument)
@@ -1008,7 +1010,8 @@ TEST_F(TokenProcessor, TemplateTypeParameterReference)
{
const auto infos = translationUnit.tokenInfosInRange(sourceRange(268, 58));
ASSERT_THAT(infos[0], HasOnlyType(HighlightingType::Type));
ASSERT_THAT(infos[0], HasTwoTypes(HighlightingType::Type,
HighlightingType::TemplateTypeParameter));
}
TEST_F(TokenProcessor, TemplateTypeParameterDeclarationReference)
@@ -1036,14 +1039,16 @@ TEST_F(TokenProcessor, TemplateTemplateParameterReference)
{
const auto infos = translationUnit.tokenInfosInRange(sourceRange(270, 89));
ASSERT_THAT(infos[0], HasOnlyType(HighlightingType::Type));
ASSERT_THAT(infos[0], HasTwoTypes(HighlightingType::Type,
HighlightingType::TemplateTemplateParameter));
}
TEST_F(TokenProcessor, TemplateTemplateContainerParameterReference)
{
const auto infos = translationUnit.tokenInfosInRange(sourceRange(270, 89));
ASSERT_THAT(infos[2], HasOnlyType(HighlightingType::Type));
ASSERT_THAT(infos[2], HasTwoTypes(HighlightingType::Type,
HighlightingType::TemplateTypeParameter));
}
TEST_F(TokenProcessor, TemplateTemplateParameterReferenceVariable)