aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-19 02:30:26 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-19 02:30:26 -0300
commit1826b5ad70ebd5db751ed0d4eee6f857a7001100 (patch)
tree90cdf5cac51ed30ca12d4ea390f65bbca5242de4 /tests
parent86b551fdf2a8bf5c6e3cebcc463ee830d65ced94 (diff)
downloadblogc-1826b5ad70ebd5db751ed0d4eee6f857a7001100.tar.gz
blogc-1826b5ad70ebd5db751ed0d4eee6f857a7001100.tar.bz2
blogc-1826b5ad70ebd5db751ed0d4eee6f857a7001100.zip
remove specific type used to store sources
Diffstat (limited to 'tests')
-rw-r--r--tests/check_source_parser.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/check_source_parser.c b/tests/check_source_parser.c
index c58479e..ede1f5e 100644
--- a/tests/check_source_parser.c
+++ b/tests/check_source_parser.c
@@ -30,17 +30,17 @@ test_source_parse(void **state)
"\n"
"bola\n";
blogc_error_t *err = NULL;
- blogc_source_t *source = blogc_source_parse(a, strlen(a), &err);
+ b_trie_t *source = blogc_source_parse(a, strlen(a), &err);
assert_null(err);
assert_non_null(source);
- assert_int_equal(b_trie_size(source->config), 2);
- assert_string_equal(b_trie_lookup(source->config, "VAR1"), "asd asd");
- assert_string_equal(b_trie_lookup(source->config, "VAR2"), "123chunda");
- assert_string_equal(source->content,
+ assert_int_equal(b_trie_size(source), 3);
+ assert_string_equal(b_trie_lookup(source, "VAR1"), "asd asd");
+ assert_string_equal(b_trie_lookup(source, "VAR2"), "123chunda");
+ assert_string_equal(b_trie_lookup(source, "CONTENT"),
"# This is a test\n"
"\n"
"bola\n");
- blogc_source_free(source);
+ b_trie_free(source);
}
@@ -57,17 +57,17 @@ test_source_parse_with_spaces(void **state)
"\n"
"bola\n";
blogc_error_t *err = NULL;
- blogc_source_t *source = blogc_source_parse(a, strlen(a), &err);
+ b_trie_t *source = blogc_source_parse(a, strlen(a), &err);
assert_null(err);
assert_non_null(source);
- assert_int_equal(b_trie_size(source->config), 2);
- assert_string_equal(b_trie_lookup(source->config, "VAR1"), "chunda");
- assert_string_equal(b_trie_lookup(source->config, "BOLA"), "guda");
- assert_string_equal(source->content,
+ assert_int_equal(b_trie_size(source), 3);
+ assert_string_equal(b_trie_lookup(source, "VAR1"), "chunda");
+ assert_string_equal(b_trie_lookup(source, "BOLA"), "guda");
+ assert_string_equal(b_trie_lookup(source, "CONTENT"),
"# This is a test\n"
"\n"
"bola\n");
- blogc_source_free(source);
+ b_trie_free(source);
}