Add default skel for unit tests. Move test programs to demo.
parent
efff783602
commit
3c7f1285d6
@ -0,0 +1,23 @@
|
||||
#include "test.h"
|
||||
|
||||
static void create_test_suite()
|
||||
{
|
||||
add_node_suite();
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
CU_pSuite pSuite = NULL;
|
||||
|
||||
/* initialize the CUnit test registry */
|
||||
if (CUE_SUCCESS != CU_initialize_registry())
|
||||
return CU_get_error();
|
||||
|
||||
create_test_suite();
|
||||
|
||||
/* Run all tests using the console interface */
|
||||
CU_basic_set_mode(CU_BRM_VERBOSE);
|
||||
CU_basic_run_tests();
|
||||
CU_cleanup_registry();
|
||||
return CU_get_error();
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
#ifndef TEST_H_
|
||||
#define TEST_H_
|
||||
|
||||
#include <CUnit/Basic.h>
|
||||
#include "libisofs.h"
|
||||
|
||||
void add_node_suite();
|
||||
|
||||
#endif /*TEST_H_*/
|
@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Unit test for node.h
|
||||
*/
|
||||
|
||||
#include "libisofs.h"
|
||||
#include "node.h"
|
||||
#include "test.h"
|
||||
|
||||
void add_node_suite()
|
||||
{
|
||||
CU_pSuite pSuite = CU_add_suite("Node Test Suite", NULL, NULL);
|
||||
|
||||
}
|
Loading…
Reference in New Issue