X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fnfaxmltest1.c;h=cf87fc4a2352936054b7a69b15c59f30f909904a;hb=45ca1fdb638bf7aac77f3882a534ca19289aeaac;hp=754be3b209e0ccdef1a4e037a7ee13fad4bfbe4e;hpb=fd3a0b7302ceed6425c05b6537cb654201cb1494;p=yaz-moved-to-github.git diff --git a/test/nfaxmltest1.c b/test/nfaxmltest1.c index 754be3b..cf87fc4 100644 --- a/test/nfaxmltest1.c +++ b/test/nfaxmltest1.c @@ -1,7 +1,7 @@ /* Copyright (C) 2006, Index Data ApS * See the file LICENSE for details. * - * $Id: nfaxmltest1.c,v 1.7 2006-07-14 13:06:38 heikki Exp $ + * $Id: nfaxmltest1.c,v 1.9 2006-10-09 14:22:44 heikki Exp $ * */ @@ -18,7 +18,7 @@ /** \brief Test parsing of a minimal, valid xml string */ -void test1() { +void test1(void) { char *xmlstr = " " " " " foo " @@ -32,7 +32,7 @@ void test1() { /** \brief Test parsing of a minimal, invalid xml string */ -void test2() { +void test2(void) { yaz_nfa *nfa; char *xmlstr = " " " " @@ -48,7 +48,7 @@ void test2() { } /** \brief Test parsing a few minimal xml files */ -void test3() { +void test3(void) { char *goodfilenames[] = { "nfaxml-simple.xml", "nfaxml-main.xml", /* x-includes nfaxml-include */ @@ -74,7 +74,7 @@ void test3() { } /** \brief Test parsing of a few minimal xml strings, with logical errors */ -void test4() { +void test4(void) { yaz_nfa *nfa; char *xmls[] = { /*a*/" ", @@ -130,13 +130,13 @@ void test4() { } } /* test4 */ -static void test5() { +static void test5(void) { struct conv_test { - unsigned char *name; + char *name; int expresult; - unsigned char *xml; - unsigned char *from; - unsigned char *to; + char *xml; + char *from; + char *to; }; struct conv_test tests[]= { { "test5-1", YAZ_NFA_SUCCESS, @@ -232,9 +232,9 @@ static void test5() { yaz_nfa *nfa; yaz_nfa_char frombuf[MAXBUF]; yaz_nfa_char tobuf[MAXBUF]; - unsigned char charbuf[MAXBUF]; + char charbuf[MAXBUF]; struct conv_test *thistest=tests; - unsigned char *cp; + char *cp; yaz_nfa_char *ycp; size_t incharsleft; size_t outcharsleft; @@ -254,7 +254,7 @@ static void test5() { } ycp=frombuf; cp=thistest->from; - while ( (*ycp++ = *cp++) ) + while ( (*ycp++ = (unsigned char)*cp++) ) ; /* strcpy, but expand to yaz_nfa_chars */ incharsleft = strlen(thistest->from); prev_incharsleft = 0;