|
@ -1,10 +1,12 @@ |
|
|
#include "unity.h" |
|
|
|
|
|
|
|
|
#include <unity.h> |
|
|
#include <limits.h> |
|
|
#include <limits.h> |
|
|
#include "CreateCustomer.h" |
|
|
#include "CreateCustomer.h" |
|
|
|
|
|
|
|
|
|
|
|
void setUp(){} |
|
|
|
|
|
void tearDown(){} |
|
|
|
|
|
|
|
|
void test_generateID(){ |
|
|
void test_generateID(){ |
|
|
|
|
|
|
|
|
srand(time(0)); |
|
|
|
|
|
const int test_values = USHRT_MAX; |
|
|
const int test_values = USHRT_MAX; |
|
|
|
|
|
|
|
|
/*initialize blocks by calling generateID()*/ |
|
|
/*initialize blocks by calling generateID()*/ |
|
@ -15,6 +17,7 @@ void test_generateID(){ |
|
|
printf("%d\n", *(numbers+i)); |
|
|
printf("%d\n", *(numbers+i)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*assertions, range checking*/ |
|
|
int delta = 5000000, expected = 5000000; |
|
|
int delta = 5000000, expected = 5000000; |
|
|
for(int i=0;i<test_values;++i) |
|
|
for(int i=0;i<test_values;++i) |
|
|
{ |
|
|
{ |