tests/at/test_at.c
/* [<][>][^][v][top][bottom][index][help] */
FUNCTIONS
This source file includes following functions.
- main
/***************************************
$Revision: 1.3 $
Example code: Unit test driver for attributes.c
******************/ /******************
Modification History:
ottrey (26/07/1999) Created.
******************/ /******************
Copyright (c) 1999 RIPE NCC
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of the author not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
***************************************/
#include "../test_.c" /* unit test template */
#include "attributes.h"
#define TEST1 "1 Init()"
#define TEST2 "2 Attributes"
int main(int argc, char **argv) {
/* [<][>][^][v][top][bottom][index][help] */
FILE *infile;
char *str;
/* Default to get the input from stdin */
infile = stdin;
/* Get the options from the command line */
get_options(argc, argv);
/* TEST1 */
if (Test[1] == 1) {
print_title(TEST1);
AT_init();
} /* TEST1 */
/* TEST2 */
if (Test[2] == 1) {
print_title(TEST2);
str = AT_attributes_to_string(1);
printf("attributes= %s\n", str);
free(str);
} /* TEST2 */
return 0;
} /* main() */