From 60596dba57fee83023f775dcb6c7de2158ea611d Mon Sep 17 00:00:00 2001 From: Dennis Sperzel Date: Mon, 29 Jan 2024 17:46:10 +0100 Subject: [PATCH] testing: addition full adder base case 0+0=0 with carryover --- test/test_addition.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/test_addition.c b/test/test_addition.c index e18db0c..02d69c2 100644 --- a/test/test_addition.c +++ b/test/test_addition.c @@ -24,4 +24,14 @@ void test_addition_volladdierer_nullplusnullgleichnull(void) 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