diff --git a/src/addition.c b/src/addition.c index fbf355a..192513a 100644 --- a/src/addition.c +++ b/src/addition.c @@ -1,6 +1,6 @@ #include "addition.h" #include -void volladdierer (int* s, int* nc, int a, int b, int c) { - s[0] = c; +void full_adder (int* sum, int* nextcarry, int number1, int number2, int carry) { + sum[0] = carry; } \ No newline at end of file diff --git a/src/addition.h b/src/addition.h index 0f01e7e..abb1cd4 100644 --- a/src/addition.h +++ b/src/addition.h @@ -1,6 +1,6 @@ #ifndef ADDITION_H #define ADDITION_H -void volladdierer (int* s, int* nc, int a, int b, int c); +void full_adder (int* sum, int* nextcarry, int number1, int number2, int carry); #endif // ADDITION_H diff --git a/test/test_addition.c b/test/test_addition.c index 02d69c2..de01d4f 100644 --- a/test/test_addition.c +++ b/test/test_addition.c @@ -14,22 +14,22 @@ void tearDown(void) { } -void test_addition_volladdierer_nullplusnullgleichnull(void) +void test_addition_full_adder_nullplusnullgleichnull(void) { int result[1]; int expected = 0; - volladdierer(result, nullcarry, 0, 0, 0); + full_adder(result, nullcarry, 0, 0, 0); TEST_ASSERT_EQUAL_INT(expected, result[0]); } -void test_addition_volladdierer_nullplusnullgleichnullmituebertrag(void) +void test_addition_full_adder_nullplusnullgleichnullmituebertrag(void) { int result[1]; int expected = 1; - volladdierer(result, nullcarry, 0, 0, 1); + full_adder(result, nullcarry, 0, 0, 1); TEST_ASSERT_EQUAL_INT(expected, result[0]); }