Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Bam4d committed May 10, 2021
1 parent 8f35363 commit 481f023
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions tests/src/Griddly/Core/GDY/Objects/ObjectTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ TEST(ObjectTest, command_set) {
ASSERT_EQ(*srcObjectPtr->getVariableValue("test_param"), 5);
ASSERT_EQ(*dstObjectPtr->getVariableValue("test_param"), 5);

verifyMocks(mockActionPtr);
verifyMocks(mockActionPtr, mockGridPtr);
}

TEST(ObjectTest, command_add) {
Expand All @@ -476,7 +476,7 @@ TEST(ObjectTest, command_add) {
ASSERT_EQ(*srcObjectPtr->getVariableValue("test_param"), 25);
ASSERT_EQ(*dstObjectPtr->getVariableValue("test_param"), 25);

verifyMocks(mockActionPtr);
verifyMocks(mockActionPtr, mockGridPtr);
}

TEST(ObjectTest, command_sub) {
Expand All @@ -494,7 +494,7 @@ TEST(ObjectTest, command_sub) {
ASSERT_EQ(*srcObjectPtr->getVariableValue("test_param"), 15);
ASSERT_EQ(*dstObjectPtr->getVariableValue("test_param"), 15);

verifyMocks(mockActionPtr);
verifyMocks(mockActionPtr, mockGridPtr);
}

TEST(ObjectTest, command_incr) {
Expand All @@ -512,7 +512,7 @@ TEST(ObjectTest, command_incr) {
ASSERT_EQ(*srcObjectPtr->getVariableValue("test_param"), 21);
ASSERT_EQ(*dstObjectPtr->getVariableValue("test_param"), 21);

verifyMocks(mockActionPtr);
verifyMocks(mockActionPtr, mockGridPtr);
}

TEST(ObjectTest, command_decr) {
Expand All @@ -530,7 +530,7 @@ TEST(ObjectTest, command_decr) {
ASSERT_EQ(*srcObjectPtr->getVariableValue("test_param"), 19);
ASSERT_EQ(*dstObjectPtr->getVariableValue("test_param"), 19);

verifyMocks(mockActionPtr);
verifyMocks(mockActionPtr, mockGridPtr);
}

TEST(ObjectTest, command_mov_dest) {
Expand Down Expand Up @@ -1176,7 +1176,7 @@ TEST(ObjectTest, command_eq) {
ASSERT_EQ(*srcObjectPtr->getVariableValue("resource"), 1);
ASSERT_EQ(*dstObjectPtr->getVariableValue("resource"), 0);

verifyMocks(mockActionPtr);
verifyMocks(mockActionPtr, mockGridPtr);
}

TEST(ObjectTest, command_eq_qualifiers) {
Expand Down Expand Up @@ -1210,7 +1210,7 @@ TEST(ObjectTest, command_eq_qualifiers) {
ASSERT_EQ(*srcObjectPtr->getVariableValue("resource"), 1);
ASSERT_EQ(*dstObjectPtr->getVariableValue("resource"), 0);

verifyMocks(mockActionPtr);
verifyMocks(mockActionPtr, mockGridPtr);
}

TEST(ObjectTest, command_lt) {
Expand Down Expand Up @@ -1243,6 +1243,8 @@ TEST(ObjectTest, command_lt) {

ASSERT_EQ(*srcObjectPtr->getVariableValue("resource"), 1);
ASSERT_EQ(*dstObjectPtr->getVariableValue("resource"), 0);

verifyMocks(mockActionPtr, mockGridPtr);
}

TEST(ObjectTest, command_gt) {
Expand Down Expand Up @@ -1276,7 +1278,7 @@ TEST(ObjectTest, command_gt) {
ASSERT_EQ(*srcObjectPtr->getVariableValue("resource"), 2);
ASSERT_EQ(*dstObjectPtr->getVariableValue("resource"), 1);

verifyMocks(mockActionPtr);
verifyMocks(mockActionPtr, mockGridPtr);
}

TEST(ObjectTest, command_neq) {
Expand Down Expand Up @@ -1310,7 +1312,7 @@ TEST(ObjectTest, command_neq) {
ASSERT_EQ(*srcObjectPtr->getVariableValue("resource"), 2);
ASSERT_EQ(*dstObjectPtr->getVariableValue("resource"), 1);

verifyMocks(mockActionPtr);
verifyMocks(mockActionPtr, mockGridPtr);
}

TEST(ObjectTest, isValidAction) {
Expand All @@ -1335,7 +1337,6 @@ TEST(ObjectTest, isValidAction) {
ASSERT_EQ(*srcObject->getVariableValue("counter"), 5);
ASSERT_TRUE(preconditionResult);

verifyMocks(mockActionPtr);
}

TEST(ObjectTest, isValidActionNotDefinedForAction) {
Expand Down

0 comments on commit 481f023

Please sign in to comment.