Browse Source

Test Exponent mit negative zahl

remotes/origin/erwin
fdai7820 11 months ago
parent
commit
f7ed7ffda1
  1. 11
      src/test/test_duellist_spielesammlung_projekt.c

11
src/test/test_duellist_spielesammlung_projekt.c

@ -590,7 +590,18 @@ void test_exponentiation(void)
TEST_ASSERT_EQUAL_INT(8, result); TEST_ASSERT_EQUAL_INT(8, result);
} }
void test_exponentiation_negativeExponent(void)
{
/* arrange */
int base = 2;
int exponent = -3;
/* act */
int result = exponentiation(base, exponent);
/* assert */
TEST_ASSERT_EQUAL_INT(0, result);
}

Loading…
Cancel
Save