summaryrefslogtreecommitdiff
path: root/test/css21.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-19 11:06:52 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-19 11:06:52 +0000
commitec53465c830b136ff4012c5958b57faee1956c37 (patch)
treed19216b0ddd625db496bfde29e10c8dcdb3d9cbb /test/css21.c
parentdc1f016626194d2f73e62e6ae6c083a7c36da013 (diff)
downloadlibcss-ec53465c830b136ff4012c5958b57faee1956c37.tar.gz
libcss-ec53465c830b136ff4012c5958b57faee1956c37.tar.bz2
Purge stylesheet dumping code from the library.
Create a common header for the test harnesses to use, instead. Fix z-index dumping while we're at it. svn path=/trunk/libcss/; revision=6146
Diffstat (limited to 'test/css21.c')
-rw-r--r--test/css21.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/css21.c b/test/css21.c
index 267beec..3da2bfb 100644
--- a/test/css21.c
+++ b/test/css21.c
@@ -4,6 +4,7 @@
#include <libcss/libcss.h>
#include "stylesheet.h"
+#include "dump.h"
#include "testutils.h"
#define ITERATIONS (1)
@@ -80,7 +81,13 @@ int main(int argc, char **argv)
#endif
#if DUMP_CSS
- css_stylesheet_dump(sheet, stdout);
+ char *out;
+ size_t outlen = origlen * 2;
+ out = malloc(outlen);
+ assert(out != NULL);
+ dump_sheet(sheet, out, &outlen);
+ fwrite(out, origlen * 2 - outlen, 1, stdout);
+ free(out);
#endif
css_stylesheet_destroy(sheet);