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.
31 lines
465 B
31 lines
465 B
#include "unity.h"
|
|
#include "ggT.h"
|
|
|
|
void setUp(){}
|
|
void tearDown(){}
|
|
|
|
void test_ggTOf5And10(){
|
|
//arrange
|
|
int a = 5;
|
|
int b = 10;
|
|
int expected = 5;
|
|
|
|
//act
|
|
int result = ggT(a,b);
|
|
|
|
//assert
|
|
TEST_ASSERT_EQUAL_INT(expected, result);
|
|
}
|
|
|
|
void test_ggTOf0AndPositiveNumber(){
|
|
//arrange
|
|
int a = 0;
|
|
int b = 5;
|
|
int expected = 5;
|
|
|
|
//act
|
|
int result = ggT(a,b);
|
|
|
|
//assert
|
|
TEST_ASSERT_EQUAL_INT(expected, result);
|
|
}
|