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.

37 lines
552 B

  1. #ifdef TEST
  2. #include "unity.h"
  3. #include "addition.h"
  4. int* nullcarry = NULL;
  5. void setUp(void)
  6. {
  7. }
  8. void tearDown(void)
  9. {
  10. }
  11. void test_addition_full_adder_nullplusnullgleichnull(void)
  12. {
  13. int result[1];
  14. int expected = 0;
  15. full_adder(result, nullcarry, 0, 0, 0);
  16. TEST_ASSERT_EQUAL_INT(expected, result[0]);
  17. }
  18. void test_addition_full_adder_nullplusnullgleichnullmituebertrag(void)
  19. {
  20. int result[1];
  21. int expected = 1;
  22. full_adder(result, nullcarry, 0, 0, 1);
  23. TEST_ASSERT_EQUAL_INT(expected, result[0]);
  24. }
  25. #endif // TEST