|
@ -66,7 +66,7 @@ void test_setEnemyHealth(void){ |
|
|
int health = 50, result; |
|
|
int health = 50, result; |
|
|
//act |
|
|
//act |
|
|
enemy test = {health*2}; |
|
|
enemy test = {health*2}; |
|
|
setEnemyHealth(&test.health, health); |
|
|
|
|
|
|
|
|
setEnemyHealth(&test, health); |
|
|
result = test.health; |
|
|
result = test.health; |
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_EQUAL(health, result); |
|
|
TEST_ASSERT_EQUAL(health, result); |
|
@ -87,7 +87,7 @@ void test_setEnemyDamage(void){ |
|
|
int damage = 4, result; |
|
|
int damage = 4, result; |
|
|
enemy test = {50, damage*2}; |
|
|
enemy test = {50, damage*2}; |
|
|
//act |
|
|
//act |
|
|
setEnemyDamage(&test.damage, damage); |
|
|
|
|
|
|
|
|
setEnemyDamage(&test, damage); |
|
|
result = test.damage; |
|
|
result = test.damage; |
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_EQUAL(damage, result); |
|
|
TEST_ASSERT_EQUAL(damage, result); |
|
@ -108,7 +108,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}; |
|
|
//act |
|
|
//act |
|
|
setEnemyArmor(&test.armor, armor); |
|
|
|
|
|
|
|
|
setEnemyArmor(&test, armor); |
|
|
result = getEnemyArmor(&test); |
|
|
result = getEnemyArmor(&test); |
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_EQUAL(armor, result); |
|
|
TEST_ASSERT_EQUAL(armor, result); |
|
|