From 7737a59d775aeb6dc14868fef6b2c95ed948d17f Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 4 Dec 2010 15:55:55 +0000 Subject: Remove use of lwc_initialise and also parserutils.h includes. r=vince svn path=/trunk/libcss/; revision=10964 --- test/parse2-auto.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'test/parse2-auto.c') diff --git a/test/parse2-auto.c b/test/parse2-auto.c index b815a8c..e64b169 100644 --- a/test/parse2-auto.c +++ b/test/parse2-auto.c @@ -5,7 +5,6 @@ #include #include -#include #include #include "utils/utils.h" @@ -42,18 +41,6 @@ static void *myrealloc(void *data, size_t len, void *pw) return realloc(data, len); } -static void *counting_realloc(void *data, size_t len, void *pw) -{ - size_t *counter = (size_t *)pw; - - if (data == NULL) - *counter += 1; - else if (len == 0) - *counter -= 1; - - return realloc(data, len); -} - static css_error resolve_url(void *pw, const char *base, lwc_string *rel, lwc_string **abs) { @@ -77,7 +64,6 @@ printing_lwc_iterator(lwc_string *str, void *pw) int main(int argc, char **argv) { line_ctx ctx; - size_t counter = 0; if (argc != 3) { printf("Usage: %s \n", argv[0]); @@ -104,8 +90,6 @@ int main(int argc, char **argv) ctx.inerrors = false; ctx.inexp = false; - assert(lwc_initialise(counting_realloc, &counter, 0) == lwc_error_ok); - assert(parse_testfile(argv[2], handle_line, &ctx) == true); /* and run final test */ @@ -114,10 +98,7 @@ int main(int argc, char **argv) free(ctx.buf); - printf("INFO: Counter is %zu\n", counter); lwc_iterate_strings(printing_lwc_iterator, NULL); - - assert(counter == 2); printf("PASS\n"); -- cgit v1.2.3