@ -1,4 +1,5 @@
#include <stdio.h>
#include "bmi.h"
float calcBMI(float a, float b){
if(a > 0 && b > 0)
@ -0,0 +1,6 @@
#ifndef BMI_H
#define BMI_H
float calcBMI(float height, float weight);
#endif //BMI_H
@ -0,0 +1,22 @@
#ifdef TEST
#include "unity.h"
void setUp(void)
{
}
void tearDown(void)
void test_berechnung_BMI(void)
float result = calcBMI(2, 100);
float expected = 25;
TEST_ASSERT_EQUAL(expected, result);
#endif