You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
369 B

12 months ago
12 months ago
  1. #ifdef TEST
  2. #include "unity.h"
  3. #include "exponent.h"
  4. void setUp(void)
  5. {
  6. }
  7. void tearDown(void)
  8. {
  9. }
  10. void test_IntegerExponent_ForPositiveExponent(void){
  11. int r1, r2, r3;
  12. r1 = expI(2, -2);
  13. r2 = expI(3, -3);
  14. r3 = expI(4, 5);
  15. TEST_ASSERT_EQUAL_INT(4, r1);
  16. TEST_ASSERT_EQUAL_INT(-27, r2);
  17. TEST_ASSERT_EQUAL_INT(625, r3);
  18. }
  19. #endif // TEST