/* [<][>][^][v][top][bottom][index][help] */
DEFINITIONS
This source file includes following functions.
- main
1 /***************************************
2 $Revision: 1.1.1.1 $
3
4 Example code: Unit test driver for attributes.c
5
6 ******************/ /******************
7 Modification History:
8 ottrey (26/07/1999) Created.
9 ******************/ /******************
10 Copyright (c) 1999 RIPE NCC
11
12 All Rights Reserved
13
14 Permission to use, copy, modify, and distribute this software and its
15 documentation for any purpose and without fee is hereby granted,
16 provided that the above copyright notice appear in all copies and that
17 both that copyright notice and this permission notice appear in
18 supporting documentation, and that the name of the author not be
19 used in advertising or publicity pertaining to distribution of the
20 software without specific, written prior permission.
21
22 THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
23 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
24 AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
25 DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
26 AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
27 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
28 ***************************************/
29 #include "../test_.c" /* unit test template */
30 #include "query_command.h"
31 #include "objects.h"
32
33 #define TEST1 "1 Test 1"
34 #define TEST2 "2 Test 2"
35 #define TEST3 "3 Test 3"
36
37 int main(int argc, char **argv) {
/* [<][>][^][v][top][bottom][index][help] */
38 FILE *infile;
39 char input[STR_L];
40 char *str;
41
42 /* Default to get the input from stdin */
43 infile = stdin;
44
45 /* Get the options from the command line */
46 get_options(argc, argv);
47
48 /* Object Initialization */
49 OB_init();
50
51 /* TEST1 */
52 if (Test[1] == 1) {
53 print_title(TEST1);
54
55 str = OB_objects_to_string();
56 printf("Objects = %s\n", str);
57 free(str);
58
59 } /* TEST1 */
60
61 /* TEST2 */
62 if (Test[2] == 1) {
63 print_title(TEST2);
64
65 str = OB_object_i_to_string(5, 1);
66 printf("Objects[5, 1] = \n%s\n", str);
67 free(str);
68
69 } /* TEST2 */
70
71 /* TEST3 */
72 if (Test[3] == 1) {
73 print_title(TEST3);
74
75 str = OB_object_i_to_string(5, 0);
76 printf("Objects[5, 0] = \n%s\n", str);
77 free(str);
78
79 } /* TEST3 */
80
81 return 0;
82
83 } /* main() */
84