aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/unittest/cursor-test.cpp
diff options
context:
space:
mode:
authorThe Qt Project <gerrit-noreply@qt-project.org>2020-10-22 12:43:04 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2020-10-22 12:43:04 +0000
commitffb5a3977fc2f50836d9c9c4e96acc65e254f24c (patch)
tree052e31fa47992fe8747f9a87164a777b18594759 /tests/unit/unittest/cursor-test.cpp
parent5a8501ffafd24725106b687c8c658354bb370f26 (diff)
parent9c6108afd1d49f5c1865840c8477ce6728022691 (diff)
Merge "Merge remote-tracking branch 'origin/4.14' into master"
Diffstat (limited to 'tests/unit/unittest/cursor-test.cpp')
-rw-r--r--tests/unit/unittest/cursor-test.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/unit/unittest/cursor-test.cpp b/tests/unit/unittest/cursor-test.cpp
index 2fa4bff7098..521002f3d22 100644
--- a/tests/unit/unittest/cursor-test.cpp
+++ b/tests/unit/unittest/cursor-test.cpp
@@ -489,7 +489,7 @@ TEST_F(Cursor, HasOutputValues)
auto outputArgumentLocations = callExpressionCursor.outputArgumentRanges();
- ASSERT_THAT(outputArgumentLocations.size(), 1);
+ ASSERT_THAT(outputArgumentLocations.size(), 2);
ASSERT_THAT(outputArgumentLocations[0], outputArgumentExpectedSourceLocation);
}
@@ -744,13 +744,13 @@ TEST_F(Cursor, PointerIsNotRefencingConstant)
ASSERT_FALSE(argument.isReferencingConstant());
}
-TEST_F(Cursor, PointerIsNotOutputArgument)
+TEST_F(Cursor, PointerIsOutputArgument)
{
auto callExpressionCursor = translationUnit.cursorAt(127, 13);
auto argument = callExpressionCursor.type().argument(0);
- ASSERT_FALSE(argument.isOutputArgument());
+ ASSERT_TRUE(argument.isOutputArgument());
}
TEST_F(Cursor, ConstantReferenceIsNotOutputArgument)
@@ -771,13 +771,13 @@ TEST_F(Cursor, PointerToConstantIsNotOutputArgument)
ASSERT_FALSE(argument.isOutputArgument()) << argument.isConstant() << argument.pointeeType().isConstant();
}
-TEST_F(Cursor, ConstantPointerIsNotOutputArgument)
+TEST_F(Cursor, ConstantPointerIsOutputArgument)
{
auto callExpressionCursor = translationUnit.cursorAt(128, 21);
auto argument = callExpressionCursor.type().argument(0);
- ASSERT_FALSE(argument.isOutputArgument());
+ ASSERT_TRUE(argument.isOutputArgument());
}
TEST_F(Cursor, ReferenceIsOutputArgument)