|
@ -59,7 +59,7 @@ void test_getEnemyHealth(void){ |
|
|
int health = 50, result; |
|
|
int health = 50, result; |
|
|
//act |
|
|
//act |
|
|
enemy test = {health}; |
|
|
enemy test = {health}; |
|
|
result = getEnemyHealth(test); |
|
|
|
|
|
|
|
|
result = getEnemyInt(&test.health); |
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_EQUAL(health, result); |
|
|
TEST_ASSERT_EQUAL(health, result); |
|
|
} |
|
|
} |
|
@ -74,7 +74,7 @@ void test_setEnemyDamage(void){ |
|
|
void test_getEnemyDamage(void){ |
|
|
void test_getEnemyDamage(void){ |
|
|
int damage = 4, result; |
|
|
int damage = 4, result; |
|
|
enemy test = {50, damage}; |
|
|
enemy test = {50, damage}; |
|
|
result = getEnemyDamage(test); |
|
|
|
|
|
|
|
|
result = getEnemyInt(&test.damage); |
|
|
TEST_ASSERT_EQUAL(damage, result); |
|
|
TEST_ASSERT_EQUAL(damage, result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -82,7 +82,7 @@ void test_get_setEnemyArmor(void){ |
|
|
int armor = 4, result; |
|
|
int armor = 4, result; |
|
|
enemy test = {50, 4, armor*2}; |
|
|
enemy test = {50, 4, armor*2}; |
|
|
setEnemyArmor(&test.armor, armor); |
|
|
setEnemyArmor(&test.armor, armor); |
|
|
result = getEnemyArmor(test); |
|
|
|
|
|
|
|
|
result = getEnemyInt(&test.armor); |
|
|
TEST_ASSERT_EQUAL(armor, result); |
|
|
TEST_ASSERT_EQUAL(armor, result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|