1 :
2 : #include "testGCD.h"
3 :
4 :
5 : // Registers the fixture into the 'registry'
6 :
7 1 : CU_pSuite getGCDSuite(){
8 1 : CU_pSuite pSuite = NULL;
9 : /* add a suite to the registry */
10 1 : pSuite = CU_add_suite("Suite_1", NULL, NULL);
11 1 : if (NULL == pSuite) {
12 0 : CU_cleanup_registry();
13 0 : return NULL;
14 : }
15 :
16 : /* add the tests to the suite */
17 1 : if ((NULL == CU_add_test(pSuite, "sample gcd test case", aSampleGCDTest)))
18 : {
19 0 : CU_cleanup_registry();
20 0 : return NULL;
21 : }
22 : /* ADD MORE TEST CASES HERE */
23 :
24 :
25 1 : return pSuite;
26 : }
27 :
28 :
29 : /*-------------------------------------------------------------------------*
30 : * GCD Test Cases
31 : *-------------------------------------------------------------------------*/
32 :
33 : void aSampleGCDTest(void)
34 1 : {
35 1 : CU_ASSERT_EQUAL(5,computeGCD(10,15));
36 1 : }
37 :
38 : // specify more test cases here
39 :
40 :
|