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/parse-auto.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'test/parse-auto.c') diff --git a/test/parse-auto.c b/test/parse-auto.c index 55a817e..2196a94 100644 --- a/test/parse-auto.c +++ b/test/parse-auto.c @@ -5,7 +5,6 @@ #include #include -#include #include #include "stylesheet.h" @@ -69,18 +68,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) { @@ -104,7 +91,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]); @@ -131,8 +117,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 */ @@ -141,11 +125,8 @@ 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"); return 0; -- cgit v1.2.3