test/harness/testcaseio.c
changeset 6 faab25d520dd
parent 5 f600b0d1fc5d
child 7 721e468c10f3
     1.1 --- a/test/harness/testcaseio.c	Fri Jan 27 10:30:16 2012 +0000
     1.2 +++ b/test/harness/testcaseio.c	Fri Jan 27 16:18:02 2012 +0000
     1.3 @@ -1,6 +1,7 @@
     1.4  #include <stdlib.h>
     1.5  #include <stdio.h>
     1.6  #include <string.h>
     1.7 +#include <glib.h>
     1.8  #include <bl/bl.h>
     1.9  #include "testcaseparser.h"
    1.10  #include "testcaseio.h"
    1.11 @@ -16,7 +17,7 @@
    1.12      TestcaseParser *parser;
    1.13      char *s;
    1.14      const char *tag,*text;
    1.15 -    boolean found_tag=FALSE;
    1.16 +    gboolean found_tag=FALSE;
    1.17      parser=testcase_parser_new_from_file(filename);
    1.18      if (!parser)
    1.19  	return NULL;
    1.20 @@ -26,17 +27,17 @@
    1.21  	testcase_parser_free(parser);
    1.22  	return NULL;
    1.23      }
    1.24 -    testcase=mem_new0(Testcase,1);
    1.25 -    testcase->basename=path_get_basename(filename);
    1.26 +    testcase=g_new0(Testcase,1);
    1.27 +    testcase->basename=g_path_get_basename(filename);
    1.28      s=strrchr(testcase->basename,'.');
    1.29      if (s)
    1.30  	*s='\0';
    1.31      while(testcase_parser_get_next_tag(parser,&tag,&text))
    1.32      {
    1.33  	if (!testcase->input && !strcmp(tag,"INPUT"))
    1.34 -	    testcase->input=str_dup(text);
    1.35 +	    testcase->input=g_strdup(text);
    1.36  	else if (!testcase->expected && !strcmp(tag,"EXPECTED"))
    1.37 -	    testcase->expected=str_dup(text);
    1.38 +	    testcase->expected=g_strdup(text);
    1.39  	else
    1.40  	{
    1.41  	    fprintf(stderr,"%s: Not a valid testcase (%s)\n",filename,tag);