|
@ -10,6 +10,8 @@ void setUp(void) |
|
|
testCharacter2.healthPoints = 15; |
|
|
testCharacter2.healthPoints = 15; |
|
|
testCharacter.strength = 0; |
|
|
testCharacter.strength = 0; |
|
|
testCharacter2.strength = 5; |
|
|
testCharacter2.strength = 5; |
|
|
|
|
|
testCharacter.dexterity = 0; |
|
|
|
|
|
testCharacter2.dexterity = 5; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void tearDown(void) |
|
|
void tearDown(void) |
|
@ -26,8 +28,7 @@ void test_setCharacterHealthPoints(void) |
|
|
void test_getCharacterHealthPoints (void) { |
|
|
void test_getCharacterHealthPoints (void) { |
|
|
TEST_ASSERT_EQUAL_INT(15,testCharacter2.healthPoints); |
|
|
TEST_ASSERT_EQUAL_INT(15,testCharacter2.healthPoints); |
|
|
} |
|
|
} |
|
|
void test_setCharacterStrenght(void) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
void test_setCharacterStrenght(void) { |
|
|
TEST_ASSERT_EQUAL_INT(0,testCharacter.strength); |
|
|
TEST_ASSERT_EQUAL_INT(0,testCharacter.strength); |
|
|
setCharacterStrength(&testCharacter,50); |
|
|
setCharacterStrength(&testCharacter,50); |
|
|
TEST_ASSERT_EQUAL_INT(50,testCharacter.strength); |
|
|
TEST_ASSERT_EQUAL_INT(50,testCharacter.strength); |
|
@ -37,4 +38,10 @@ void test_getCharacterStrength(void) { |
|
|
TEST_ASSERT_EQUAL_INT(5,testCharacter2.strength); |
|
|
TEST_ASSERT_EQUAL_INT(5,testCharacter2.strength); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_setCharacterDexterity(void) { |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(0,testCharacter.dexterity); |
|
|
|
|
|
setCharacterDexterity(&testCharacter,50); |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(50,testCharacter.dexterity); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
#endif // TEST |
|
|
#endif // TEST |