Teonet library  0.4.7
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
test_teonet.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <CUnit/Basic.h>
#include "ev_mgr.h"

Functions

int add_suite_1_tests (void)
 Add Crypt suite tests. More...
 
int add_suite_3_tests (void)
 Add Teonet DB module tests. More...
 
int add_suite_4_tests (void)
 Add Callback QUEUE module tests. More...
 
int add_suite_5_tests (void)
 Add TCP Proxy suite tests. More...
 
int add_suite_6_tests (void)
 Add Subscribe module tests. More...
 
int add_suite_filter_tests (void)
 
int init_suite (void)
 Initialize suite. More...
 
int clean_suite (void)
 
int main ()
 cUnit test main function More...
 

Variables

CU_pSuite pSuite = NULL
 

Detailed Description

Author
Kirill Scherba kiril.nosp@m.l@sc.nosp@m.herba.nosp@m..ru

Teonet cUnit test (main test module)

cUnit test main module code:

#include <stdio.h>
#include <stdlib.h>
#include <CUnit/Basic.h>
#include "ev_mgr.h"
// Modules functions
// Global variables
CU_pSuite pSuite = NULL;
/*
* CUnit Test
*/
int init_suite(void) {
return 0;
}
int clean_suite(void) {
return 0;
}
int main() {
// Initialize the CUnit test registry
if (CUE_SUCCESS != CU_initialize_registry())
return CU_get_error();
// Add a suite to the registry
pSuite = CU_add_suite("Teonet library Crypt module", init_suite, clean_suite);
if (NULL == pSuite) {
CU_cleanup_registry();
return CU_get_error();
}
// Add a suite to the registry
pSuite = CU_add_suite("Teonet library TR-UDP module", init_suite, clean_suite);
if (NULL == pSuite) {
CU_cleanup_registry();
return CU_get_error();
}
// Add a suite to the registry
pSuite = CU_add_suite("Teonet DB based at PBL KeyFile module functions", init_suite, clean_suite);
if (NULL == pSuite) {
CU_cleanup_registry();
return CU_get_error();
}
// Add a suite to the registry
pSuite = CU_add_suite("Callback QUEUE module functions", init_suite, clean_suite);
if (NULL == pSuite) {
CU_cleanup_registry();
return CU_get_error();
}
// Add a suite to the registry
pSuite = CU_add_suite("TCP Proxy module functions", init_suite, clean_suite);
if (NULL == pSuite) {
CU_cleanup_registry();
return CU_get_error();
}
// Add a suite to the registry
pSuite = CU_add_suite("Subscribe module functions", init_suite, clean_suite);
if (NULL == pSuite) {
CU_cleanup_registry();
return CU_get_error();
}
// Add a suite to the registry
pSuite = CU_add_suite("Text-filter module functions", init_suite, clean_suite);
if (NULL == pSuite) {
CU_cleanup_registry();
return CU_get_error();
}
/* Run all tests using the CUnit Basic interface */
CU_basic_set_mode(CU_BRM_VERBOSE);
//CU_list_tests_to_file();
CU_basic_run_tests();
//CU_console_run_tests();
CU_cleanup_registry();
return CU_get_error();
}

Created on Aug 7, 2015, 9:31:12 PM

Function Documentation

int add_suite_1_tests ( void  )

Add Crypt suite tests.

Returns

References pSuite, test_1_1(), and test_1_2().

Referenced by main().

int add_suite_3_tests ( void  )

Add Teonet DB module tests.

Returns

References pSuite, test_3_1(), test_3_2(), test_3_3(), test_3_4(), and test_3_5().

Referenced by main().

int add_suite_4_tests ( void  )

Add Callback QUEUE module tests.

Returns

References pSuite, and test_4_1().

Referenced by main().

int add_suite_5_tests ( void  )

Add TCP Proxy suite tests.

Returns

References pSuite, test_5_1(), and test_5_2().

Referenced by main().

int add_suite_6_tests ( void  )

Add Subscribe module tests.

Returns

References pSuite, test_6_1(), and test_6_2().

Referenced by main().

int add_suite_filter_tests ( void  )

References pSuite, test_filter_1(), and test_filter_2().

Referenced by main().

int clean_suite ( void  )

Referenced by main().

int init_suite ( void  )

Initialize suite.

Referenced by main().

Variable Documentation