]> git.donarmstrong.com Git - biopieces.git/blob - code_c/Maasha/src/test/test_common.c
fixed encoding bug in read_454
[biopieces.git] / code_c / Maasha / src / test / test_common.c
1 #include "common.h"
2 #include "CUnit/Basic.h"
3
4 int init_suite( void )
5 {
6     return 0;
7 }
8
9 int clean_suite( void )
10 {
11     return 0;
12 }
13
14 void test_def_TRUE()
15 {
16     assert( TRUE == 1 );
17 }
18
19 void test_def_FALSE()
20 {
21     assert( FALSE == 0 );
22 }
23
24 int main()
25 {
26     CU_pSuite pSuite = NULL;
27
28     /* initialize the CUnit test registry */
29     if ( CUE_SUCCESS != CU_initialize_registry() ) {
30         return CU_get_error();
31     }
32
33     /* add a suite to the registry */
34     pSuite = CU_add_suite( "Testing Common", init_suite, clean_suite );
35
36     if ( NULL == pSuite ) {
37         CU_cleanup_registry();
38         return CU_get_error();
39     }
40
41     /* add the tests to the suite */
42     /* NOTE - ORDER IS IMPORTANT */
43     if ( ( NULL == CU_add_test( pSuite, "test of def_TRUE()", test_def_TRUE ) ) ||
44          ( NULL == CU_add_test( pSuite, "test of def_TRUE()", test_def_TRUE ) )
45        )
46     {
47         CU_cleanup_registry();
48         return CU_get_error();
49     }
50
51
52
53     /* Run all tests using the CUnit Basic interface */
54     CU_basic_set_mode(CU_BRM_VERBOSE);
55     CU_basic_run_tests();
56     CU_cleanup_registry();
57     return CU_get_error();
58 }