diff options
author | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2010-12-04 15:55:55 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2010-12-04 15:55:55 +0000 |
commit | 7737a59d775aeb6dc14868fef6b2c95ed948d17f (patch) | |
tree | 6eb1ecb274b76cbbea24e066e5740b3708b21590 /test/parse-auto.c | |
parent | 0f42317438bf0f5e85a17ada1bdf755e82fadf30 (diff) | |
download | libcss-7737a59d775aeb6dc14868fef6b2c95ed948d17f.tar.gz libcss-7737a59d775aeb6dc14868fef6b2c95ed948d17f.tar.bz2 |
Remove use of lwc_initialise and also parserutils.h includes. r=vince
svn path=/trunk/libcss/; revision=10964
Diffstat (limited to 'test/parse-auto.c')
-rw-r--r-- | test/parse-auto.c | 19 |
1 files changed, 0 insertions, 19 deletions
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 <stdlib.h> #include <string.h> -#include <parserutils/parserutils.h> #include <libcss/libcss.h> #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 <aliases_file> <filename>\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; |