summaryrefslogtreecommitdiff
path: root/test/select-auto.c
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2010-12-04 15:55:55 +0000
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2010-12-04 15:55:55 +0000
commit7737a59d775aeb6dc14868fef6b2c95ed948d17f (patch)
tree6eb1ecb274b76cbbea24e066e5740b3708b21590 /test/select-auto.c
parent0f42317438bf0f5e85a17ada1bdf755e82fadf30 (diff)
downloadlibcss-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/select-auto.c')
-rw-r--r--test/select-auto.c19
1 files changed, 0 insertions, 19 deletions
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 <stdlib.h>
#include <string.h>
-#include <parserutils/parserutils.h>
#include <libcss/libcss.h>
#include <libcss/computed.h>
#include <libcss/select.h>
@@ -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 <aliases_file> <filename>\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;
}