summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2011-01-26 12:49:58 +0000
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2011-01-26 12:49:58 +0000
commit9a026637586cc90ce3418e945210c90313434306 (patch)
tree5c06aff26935112320620fdd1fe45f6a447763c5 /test
parentff6f6cf29dbe18a2541ba73c2542253c5ffb0abc (diff)
downloadlibcss-9a026637586cc90ce3418e945210c90313434306.tar.gz
Rename all css_[^_] internal symbols to css__ so that they're nicely namespaced
svn path=/trunk/libcss/; revision=11492
Diffstat (limited to 'test')
-rw-r--r--test/csdetect.c2
-rw-r--r--test/dump.h20
-rw-r--r--test/lex-auto.c8
-rw-r--r--test/lex.c10
-rw-r--r--test/parse-auto.c2
-rw-r--r--test/parse.c8
6 files changed, 25 insertions, 25 deletions
diff --git a/test/csdetect.c b/test/csdetect.c
index efd764d..c254cdd 100644
--- a/test/csdetect.c
+++ b/test/csdetect.c
@@ -107,7 +107,7 @@ void run_test(const uint8_t *data, size_t len, char *expected)
css_charset_source source = CSS_CHARSET_DEFAULT;
static int testnum;
- assert(css_charset_extract(data, len, &mibenum, &source) == CSS_OK);
+ assert(css__charset_extract(data, len, &mibenum, &source) == CSS_OK);
assert(mibenum != 0);
diff --git a/test/dump.h b/test/dump.h
index 4f82f14..36f4278 100644
--- a/test/dump.h
+++ b/test/dump.h
@@ -760,7 +760,7 @@ void dump_bytecode(css_style *style, char **ptr, uint32_t depth)
case BACKGROUND_IMAGE_URI:
{
uint32_t snum = *((uint32_t *) bytecode); lwc_string *he;
- css_stylesheet_string_get(style->sheet,
+ css__stylesheet_string_get(style->sheet,
snum,
&he);
ADVANCE(sizeof(snum));
@@ -1102,7 +1102,7 @@ void dump_bytecode(css_style *style, char **ptr, uint32_t depth)
switch (value & 0xff) {
case CONTENT_COUNTER:
- css_stylesheet_string_get(style->sheet, snum, &he);
+ css__stylesheet_string_get(style->sheet, snum, &he);
ADVANCE(sizeof(snum));
dump_counter(he, value, ptr);
break;
@@ -1110,7 +1110,7 @@ void dump_bytecode(css_style *style, char **ptr, uint32_t depth)
case CONTENT_COUNTERS:
{
lwc_string *sep;
- css_stylesheet_string_get(style->sheet, snum, &he);
+ css__stylesheet_string_get(style->sheet, snum, &he);
ADVANCE(sizeof(snum));
sep = *((lwc_string **) bytecode);
@@ -1124,7 +1124,7 @@ void dump_bytecode(css_style *style, char **ptr, uint32_t depth)
case CONTENT_URI:
case CONTENT_ATTR:
case CONTENT_STRING:
- css_stylesheet_string_get(style->sheet, snum, &he);
+ css__stylesheet_string_get(style->sheet, snum, &he);
if (value == CONTENT_URI)
*ptr += sprintf(*ptr, "url(");
if (value == CONTENT_ATTR)
@@ -1176,7 +1176,7 @@ void dump_bytecode(css_style *style, char **ptr, uint32_t depth)
while (value != COUNTER_INCREMENT_NONE) {
css_fixed val;
uint32_t snum = *((uint32_t *) bytecode); lwc_string *he;
- css_stylesheet_string_get(style->sheet,
+ css__stylesheet_string_get(style->sheet,
snum,
&he);
ADVANCE(sizeof(snum));
@@ -1204,7 +1204,7 @@ void dump_bytecode(css_style *style, char **ptr, uint32_t depth)
case CSS_PROP_CURSOR:
while (value == CURSOR_URI) {
uint32_t snum = *((uint32_t *) bytecode); lwc_string *he;
- css_stylesheet_string_get(style->sheet,
+ css__stylesheet_string_get(style->sheet,
snum,
&he);
ADVANCE(sizeof(snum));
@@ -1392,7 +1392,7 @@ void dump_bytecode(css_style *style, char **ptr, uint32_t depth)
{
uint32_t snum = *((uint32_t *) bytecode);
lwc_string *he;
- css_stylesheet_string_get(style->sheet, snum, &he);
+ css__stylesheet_string_get(style->sheet, snum, &he);
ADVANCE(sizeof(snum));
*ptr += sprintf(*ptr, "'%.*s'",
(int) lwc_string_length(he),
@@ -1811,7 +1811,7 @@ void dump_bytecode(css_style *style, char **ptr, uint32_t depth)
{
uint32_t snum = *((uint32_t *) bytecode);
lwc_string *he;
- css_stylesheet_string_get(style->sheet, snum, &he);
+ css__stylesheet_string_get(style->sheet, snum, &he);
ADVANCE(sizeof(snum));
*ptr += sprintf(*ptr, "'%.*s'",
(int) lwc_string_length(he),
@@ -1853,7 +1853,7 @@ void dump_bytecode(css_style *style, char **ptr, uint32_t depth)
while (value != QUOTES_NONE) {
uint32_t snum = *((uint32_t *) bytecode);
lwc_string *he;
- css_stylesheet_string_get(style->sheet, snum, &he);
+ css__stylesheet_string_get(style->sheet, snum, &he);
ADVANCE(sizeof(snum));
*ptr += sprintf(*ptr, " '%.*s' ",
(int) lwc_string_length(he),
@@ -2087,7 +2087,7 @@ void dump_bytecode(css_style *style, char **ptr, uint32_t depth)
{
uint32_t snum = *((uint32_t *) bytecode);
lwc_string *he;
- css_stylesheet_string_get(style->sheet, snum, &he);
+ css__stylesheet_string_get(style->sheet, snum, &he);
ADVANCE(sizeof(snum));
*ptr += sprintf(*ptr, "'%.*s'",
(int) lwc_string_length(he),
diff --git a/test/lex-auto.c b/test/lex-auto.c
index 044d9dd..2455e17 100644
--- a/test/lex-auto.c
+++ b/test/lex-auto.c
@@ -274,10 +274,10 @@ 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) ==
+ css__charset_extract, myrealloc, NULL, &input) ==
PARSERUTILS_OK);
- assert(css_lexer_create(input, myrealloc, NULL, &lexer) == CSS_OK);
+ assert(css__lexer_create(input, myrealloc, NULL, &lexer) == CSS_OK);
assert(parserutils_inputstream_append(input, data, len) ==
PARSERUTILS_OK);
@@ -288,7 +288,7 @@ void run_test(const uint8_t *data, size_t len, exp_entry *exp, size_t explen)
e = 0;
testnum++;
- while ((error = css_lexer_get_token(lexer, &tok)) == CSS_OK) {
+ while ((error = css__lexer_get_token(lexer, &tok)) == CSS_OK) {
if (tok->type != exp[e].type) {
printf("%d: Got token %s, Expected %s [%d, %d]\n",
testnum, string_from_type(tok->type),
@@ -323,7 +323,7 @@ void run_test(const uint8_t *data, size_t len, exp_entry *exp, size_t explen)
assert(e == explen);
- css_lexer_destroy(lexer);
+ css__lexer_destroy(lexer);
parserutils_inputstream_destroy(input);
diff --git a/test/lex.c b/test/lex.c
index f8b369b..a61826e 100644
--- a/test/lex.c
+++ b/test/lex.c
@@ -137,11 +137,11 @@ int main(int argc, char **argv)
for (i = 0; i < ITERATIONS; i++) {
assert(parserutils_inputstream_create("UTF-8",
- CSS_CHARSET_DICTATED,css_charset_extract,
+ CSS_CHARSET_DICTATED,css__charset_extract,
(parserutils_alloc) myrealloc, NULL, &stream) ==
PARSERUTILS_OK);
- assert(css_lexer_create(stream, myrealloc, NULL, &lexer) ==
+ assert(css__lexer_create(stream, myrealloc, NULL, &lexer) ==
CSS_OK);
fp = fopen(argv[1], "rb");
@@ -163,7 +163,7 @@ int main(int argc, char **argv)
len -= CHUNK_SIZE;
- while ((error = css_lexer_get_token(lexer, &tok)) ==
+ while ((error = css__lexer_get_token(lexer, &tok)) ==
CSS_OK) {
printToken(tok);
@@ -187,14 +187,14 @@ int main(int argc, char **argv)
assert(parserutils_inputstream_append(stream, NULL, 0) ==
PARSERUTILS_OK);
- while ((error = css_lexer_get_token(lexer, &tok)) == CSS_OK) {
+ while ((error = css__lexer_get_token(lexer, &tok)) == CSS_OK) {
printToken(tok);
if (tok->type == CSS_TOKEN_EOF)
break;
}
- css_lexer_destroy(lexer);
+ css__lexer_destroy(lexer);
parserutils_inputstream_destroy(stream);
}
diff --git a/test/parse-auto.c b/test/parse-auto.c
index 0d26829..84bce9b 100644
--- a/test/parse-auto.c
+++ b/test/parse-auto.c
@@ -521,7 +521,7 @@ bool validate_rule_selector(css_rule_selector *s, exp_entry *e)
/* String */
lwc_string *p;
- css_stylesheet_string_get(s->style->sheet, (s->style->bytecode[i / sizeof(css_code_t)]), &p);
+ css__stylesheet_string_get(s->style->sheet, (s->style->bytecode[i / sizeof(css_code_t)]), &p);
if (lwc_string_length(p) !=
strlen(e->stringtab[j].string) ||
diff --git a/test/parse.c b/test/parse.c
index aaa9e2f..d52ee5d 100644
--- a/test/parse.c
+++ b/test/parse.c
@@ -90,12 +90,12 @@ int main(int argc, char **argv)
}
for (i = 0; i < ITERATIONS; i++) {
- assert(css_parser_create("UTF-8", CSS_CHARSET_DICTATED,
+ assert(css__parser_create("UTF-8", CSS_CHARSET_DICTATED,
myrealloc, NULL, &parser) == CSS_OK);
params.event_handler.handler = event_handler;
params.event_handler.pw = NULL;
- assert(css_parser_setopt(parser, CSS_PARSER_EVENT_HANDLER,
+ assert(css__parser_setopt(parser, CSS_PARSER_EVENT_HANDLER,
&params) == CSS_OK);
fp = fopen(argv[1], "rb");
@@ -130,9 +130,9 @@ int main(int argc, char **argv)
fclose(fp);
- assert(css_parser_completed(parser) == CSS_OK);
+ assert(css__parser_completed(parser) == CSS_OK);
- css_parser_destroy(parser);
+ css__parser_destroy(parser);
}