summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-12-14 23:17:15 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2013-12-14 23:17:15 (GMT)
commit5196369f0b637e2cb37b08787cf96a33a704491f (patch)
tree98ae8ce05000355abe9ddd2d6cef473374f6f496 /test
parent701d16aa5ee8d39188dffb797ce14d7d0f95967a (diff)
downloadlibcss-5196369f0b637e2cb37b08787cf96a33a704491f.tar.gz
libcss-5196369f0b637e2cb37b08787cf96a33a704491f.tar.bz2
Update for new lpu API.
Diffstat (limited to 'test')
-rw-r--r--test/lex-auto.c10
-rw-r--r--test/lex.c11
2 files changed, 2 insertions, 19 deletions
diff --git a/test/lex-auto.c b/test/lex-auto.c
index 6b22f6f..f2f6007 100644
--- a/test/lex-auto.c
+++ b/test/lex-auto.c
@@ -42,13 +42,6 @@ static css_token_type string_to_type(const char *data, size_t len);
static void run_test(const uint8_t *data, size_t len,
exp_entry *exp, size_t explen);
-static void *myrealloc(void *data, size_t len, void *pw)
-{
- UNUSED(pw);
-
- return realloc(data, len);
-}
-
int main(int argc, char **argv)
{
line_ctx ctx;
@@ -274,8 +267,7 @@ void run_test(const uint8_t *data, size_t len, exp_entry *exp, size_t explen)
static int testnum;
assert(parserutils_inputstream_create("UTF-8", CSS_CHARSET_DICTATED,
- css__charset_extract, myrealloc, NULL, &input) ==
- PARSERUTILS_OK);
+ css__charset_extract, &input) == PARSERUTILS_OK);
assert(css__lexer_create(input, &lexer) == CSS_OK);
diff --git a/test/lex.c b/test/lex.c
index 2bce4c0..24401af 100644
--- a/test/lex.c
+++ b/test/lex.c
@@ -16,14 +16,6 @@
#define ITERATIONS (1)
#define DUMP_TOKENS (0)
-
-static void *myrealloc(void *data, size_t len, void *pw)
-{
- UNUSED(pw);
-
- return realloc(data, len);
-}
-
static void printToken(const css_token *token)
{
#if !DUMP_TOKENS
@@ -138,8 +130,7 @@ int main(int argc, char **argv)
for (i = 0; i < ITERATIONS; i++) {
assert(parserutils_inputstream_create("UTF-8",
CSS_CHARSET_DICTATED,css__charset_extract,
- (parserutils_alloc) myrealloc, NULL, &stream) ==
- PARSERUTILS_OK);
+ &stream) == PARSERUTILS_OK);
assert(css__lexer_create(stream, &lexer) ==
CSS_OK);