test(unit): Extend unit tests
[ric-plt/lib/rmr.git] / test / mbuf_api_test.c
1 // : vi ts=4 sw=4 noet :
2 /*
3 ==================================================================================
4         Copyright (c) 2019 Nokia
5         Copyright (c) 2018-2019 AT&T Intellectual Property.
6
7    Licensed under the Apache License, Version 2.0 (the "License");
8    you may not use this file except in compliance with the License.
9    You may obtain a copy of the License at
10
11        http://www.apache.org/licenses/LICENSE-2.0
12
13    Unless required by applicable law or agreed to in writing, software
14    distributed under the License is distributed on an "AS IS" BASIS,
15    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16    See the License for the specific language governing permissions and
17    limitations under the License.
18 ==================================================================================
19 */
20
21
22 /*
23         Mnemonic:       mbuf_api_test.c
24         Abstract:       Unit tests for the mbuf common API functions.
25         Author:         E. Scott Daniels
26         Date:           2 April 2019
27 */
28
29
30 #include <stdio.h>
31 #include <stdlib.h>
32 #include <netdb.h>
33 #include <errno.h>
34 #include <string.h>
35 #include <errno.h>
36 #include <pthread.h>
37 #include <ctype.h>
38
39
40 #include "../src/common/include/rmr.h"
41 #include "../src/common/include/rmr_agnostic.h"
42
43 #include "../src/common/src/mbuf_api.c"                 // module under test
44
45 #include "test_support.c"                                               // our private library of test tools
46 #include "mbuf_api_static_test.c"                               // test functions
47
48 int main( ) {
49         int errors = 0;
50
51         errors += mbuf_api_test( );
52
53         if( errors ) {
54                 fprintf( stderr, "<FAIL> mbuf_api tests failed\n" );
55         } else {
56                 fprintf( stderr, "<OK>   mbuf_api tests pass\n" );
57         }
58 }