forked from qt-creator/qt-creator
Clang: Fix tests for output arguments
Change-Id: I9aeef5758c6291f19efc3d72d5d985adad4c13ab Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
committed by
Nikolai Kosjar
parent
9297ee92c6
commit
5ab729ea10
@@ -494,7 +494,7 @@ TEST_F(Cursor, HasOutputValues)
|
|||||||
|
|
||||||
auto outputArgumentLocations = callExpressionCursor.outputArgumentRanges();
|
auto outputArgumentLocations = callExpressionCursor.outputArgumentRanges();
|
||||||
|
|
||||||
ASSERT_THAT(outputArgumentLocations.size(), 2);
|
ASSERT_THAT(outputArgumentLocations.size(), 1);
|
||||||
ASSERT_THAT(outputArgumentLocations[0], outputArgumentExpectedSourceLocation);
|
ASSERT_THAT(outputArgumentLocations[0], outputArgumentExpectedSourceLocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -749,13 +749,13 @@ TEST_F(Cursor, PointerIsNotRefencingConstant)
|
|||||||
ASSERT_FALSE(argument.isReferencingConstant());
|
ASSERT_FALSE(argument.isReferencingConstant());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(Cursor, PointerIsOutputArgument)
|
TEST_F(Cursor, PointerIsNotOutputArgument)
|
||||||
{
|
{
|
||||||
auto callExpressionCursor = translationUnit.cursorAt(127, 13);
|
auto callExpressionCursor = translationUnit.cursorAt(127, 13);
|
||||||
|
|
||||||
auto argument = callExpressionCursor.type().argument(0);
|
auto argument = callExpressionCursor.type().argument(0);
|
||||||
|
|
||||||
ASSERT_TRUE(argument.isOutputArgument());
|
ASSERT_FALSE(argument.isOutputArgument());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(Cursor, ConstantReferenceIsNotOutputArgument)
|
TEST_F(Cursor, ConstantReferenceIsNotOutputArgument)
|
||||||
@@ -782,7 +782,7 @@ TEST_F(Cursor, ConstantPointerIsNotOutputArgument)
|
|||||||
|
|
||||||
auto argument = callExpressionCursor.type().argument(0);
|
auto argument = callExpressionCursor.type().argument(0);
|
||||||
|
|
||||||
ASSERT_TRUE(argument.isOutputArgument());
|
ASSERT_FALSE(argument.isOutputArgument());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(Cursor, ReferenceIsOutputArgument)
|
TEST_F(Cursor, ReferenceIsOutputArgument)
|
||||||
|
Reference in New Issue
Block a user