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/select-auto.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'test/select-auto.c') diff --git a/test/select-auto.c b/test/select-auto.c index a5a8e91..ff9de09 100644 --- a/test/select-auto.c +++ b/test/select-auto.c @@ -5,7 +5,6 @@ #include #include -#include #include #include #include @@ -167,18 +166,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) { @@ -202,7 +189,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]); @@ -214,8 +200,6 @@ int main(int argc, char **argv) memset(&ctx, 0, sizeof(ctx)); - assert(lwc_initialise(counting_realloc, &counter, 0) == lwc_error_ok); - lwc_intern_string("class", SLEN("class"), &ctx.attr_class); lwc_intern_string("id", SLEN("id"), &ctx.attr_id); @@ -231,11 +215,8 @@ int main(int argc, char **argv) lwc_string_unref(ctx.attr_class); lwc_string_unref(ctx.attr_id); - 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