Browse Source

testing: addition full adder base case 0+0=0 with carryover

master
Dennis Sperzel 11 months ago
parent
commit
60596dba57
  1. 10
      test/test_addition.c

10
test/test_addition.c

@ -24,4 +24,14 @@ void test_addition_volladdierer_nullplusnullgleichnull(void)
TEST_ASSERT_EQUAL_INT(expected, result[0]); TEST_ASSERT_EQUAL_INT(expected, result[0]);
} }
void test_addition_volladdierer_nullplusnullgleichnullmituebertrag(void)
{
int result[1];
int expected = 1;
volladdierer(result, nullcarry, 0, 0, 1);
TEST_ASSERT_EQUAL_INT(expected, result[0]);
}
#endif // TEST #endif // TEST
Loading…
Cancel
Save