]> git.evergreen-ils.org Git - OpenSRF.git/blob - tests/check_osrf_stack.c
LP#1655449: Bundling/chunking limits for SubRquests
[OpenSRF.git] / tests / check_osrf_stack.c
1 #include <check.h>
2 #include "opensrf/osrf_stack.h"
3
4
5
6 //Set up the test fixture
7 void setup(void){
8 }
9
10 //Clean up the test fixture
11 void teardown(void){
12 }
13
14 // BEGIN TESTS
15
16 START_TEST(test_osrf_stack_process)
17   int *mr = 0;
18   fail_unless(osrf_stack_process(NULL, 10, mr) == -1,
19       "osrf_stack_process should return -1 if client arg is NULL");
20 END_TEST
21
22 //END TESTS
23
24 Suite *osrf_stack_suite(void) {
25   //Create test suite, test case, initialize fixture
26   Suite *s = suite_create("osrf_stack");
27   TCase *tc_core = tcase_create("Core");
28   tcase_add_checked_fixture(tc_core, setup, teardown);
29
30   //Add tests to test case
31   tcase_add_test(tc_core, test_osrf_stack_process);
32
33   //Add test case to test suite
34   suite_add_tcase(s, tc_core);
35
36   return s;
37 }
38
39 void run_tests(SRunner *sr) {
40   srunner_add_suite(sr, osrf_stack_suite());
41 }