diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-04-05 22:35:25 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-04-05 22:35:35 +0200 |
commit | c43b487246fdfd2ddc5c794763b18255ac6a318e (patch) | |
tree | c5b2b5ef837e9e796842155a6f7943745c61d135 /tests/blogc-make/check_rules.c | |
parent | 0a7f6a2659b363e1d68202b9fd863b57f7420f4f (diff) | |
download | blogc-c43b487246fdfd2ddc5c794763b18255ac6a318e.tar.gz blogc-c43b487246fdfd2ddc5c794763b18255ac6a318e.tar.bz2 blogc-c43b487246fdfd2ddc5c794763b18255ac6a318e.zip |
*: use squareball
yeah, changed my mind again :)
Diffstat (limited to 'tests/blogc-make/check_rules.c')
-rw-r--r-- | tests/blogc-make/check_rules.c | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/tests/blogc-make/check_rules.c b/tests/blogc-make/check_rules.c index c8bd9a8..3154380 100644 --- a/tests/blogc-make/check_rules.c +++ b/tests/blogc-make/check_rules.c @@ -13,70 +13,70 @@ #include <stdlib.h> #include <string.h> +#include <squareball.h> #include "../../src/blogc-make/rules.h" -#include "../../src/common/utils.h" static void test_rule_parse_args(void **state) { - bc_trie_t *t = bm_rule_parse_args("bola:foo=" + 4); + sb_trie_t *t = bm_rule_parse_args("bola:foo=" + 4); assert_non_null(t); - assert_int_equal(bc_trie_size(t), 1); - assert_string_equal(bc_trie_lookup(t, "foo"), ""); - bc_trie_free(t); + assert_int_equal(sb_trie_size(t), 1); + assert_string_equal(sb_trie_lookup(t, "foo"), ""); + sb_trie_free(t); t = bm_rule_parse_args("bola:foo=bar" + 4); assert_non_null(t); - assert_int_equal(bc_trie_size(t), 1); - assert_string_equal(bc_trie_lookup(t, "foo"), "bar"); - bc_trie_free(t); + assert_int_equal(sb_trie_size(t), 1); + assert_string_equal(sb_trie_lookup(t, "foo"), "bar"); + sb_trie_free(t); t = bm_rule_parse_args("bola:foo=,baz=lol" + 4); assert_non_null(t); - assert_int_equal(bc_trie_size(t), 2); - assert_string_equal(bc_trie_lookup(t, "foo"), ""); - assert_string_equal(bc_trie_lookup(t, "baz"), "lol"); - bc_trie_free(t); + assert_int_equal(sb_trie_size(t), 2); + assert_string_equal(sb_trie_lookup(t, "foo"), ""); + assert_string_equal(sb_trie_lookup(t, "baz"), "lol"); + sb_trie_free(t); t = bm_rule_parse_args("bola:foo=bar,baz=" + 4); assert_non_null(t); - assert_int_equal(bc_trie_size(t), 2); - assert_string_equal(bc_trie_lookup(t, "foo"), "bar"); - assert_string_equal(bc_trie_lookup(t, "baz"), ""); - bc_trie_free(t); + assert_int_equal(sb_trie_size(t), 2); + assert_string_equal(sb_trie_lookup(t, "foo"), "bar"); + assert_string_equal(sb_trie_lookup(t, "baz"), ""); + sb_trie_free(t); t = bm_rule_parse_args("bola:foo=bar,baz=lol" + 4); assert_non_null(t); - assert_int_equal(bc_trie_size(t), 2); - assert_string_equal(bc_trie_lookup(t, "foo"), "bar"); - assert_string_equal(bc_trie_lookup(t, "baz"), "lol"); - bc_trie_free(t); + assert_int_equal(sb_trie_size(t), 2); + assert_string_equal(sb_trie_lookup(t, "foo"), "bar"); + assert_string_equal(sb_trie_lookup(t, "baz"), "lol"); + sb_trie_free(t); t = bm_rule_parse_args("bola:foo=,baz=lol,asd=qwe" + 4); assert_non_null(t); - assert_int_equal(bc_trie_size(t), 3); - assert_string_equal(bc_trie_lookup(t, "foo"), ""); - assert_string_equal(bc_trie_lookup(t, "baz"), "lol"); - assert_string_equal(bc_trie_lookup(t, "asd"), "qwe"); - bc_trie_free(t); + assert_int_equal(sb_trie_size(t), 3); + assert_string_equal(sb_trie_lookup(t, "foo"), ""); + assert_string_equal(sb_trie_lookup(t, "baz"), "lol"); + assert_string_equal(sb_trie_lookup(t, "asd"), "qwe"); + sb_trie_free(t); t = bm_rule_parse_args("bola:foo=bar,baz=,asd=qwe" + 4); assert_non_null(t); - assert_int_equal(bc_trie_size(t), 3); - assert_string_equal(bc_trie_lookup(t, "foo"), "bar"); - assert_string_equal(bc_trie_lookup(t, "baz"), ""); - assert_string_equal(bc_trie_lookup(t, "asd"), "qwe"); - bc_trie_free(t); + assert_int_equal(sb_trie_size(t), 3); + assert_string_equal(sb_trie_lookup(t, "foo"), "bar"); + assert_string_equal(sb_trie_lookup(t, "baz"), ""); + assert_string_equal(sb_trie_lookup(t, "asd"), "qwe"); + sb_trie_free(t); t = bm_rule_parse_args("bola:foo=bar,baz=lol,asd=" + 4); assert_non_null(t); - assert_int_equal(bc_trie_size(t), 3); - assert_string_equal(bc_trie_lookup(t, "foo"), "bar"); - assert_string_equal(bc_trie_lookup(t, "baz"), "lol"); - assert_string_equal(bc_trie_lookup(t, "asd"), ""); - bc_trie_free(t); + assert_int_equal(sb_trie_size(t), 3); + assert_string_equal(sb_trie_lookup(t, "foo"), "bar"); + assert_string_equal(sb_trie_lookup(t, "baz"), "lol"); + assert_string_equal(sb_trie_lookup(t, "asd"), ""); + sb_trie_free(t); t = bm_rule_parse_args("bola:foo=bar,baz=lol,asd=qwe" + 4); assert_non_null(t); - assert_int_equal(bc_trie_size(t), 3); - assert_string_equal(bc_trie_lookup(t, "foo"), "bar"); - assert_string_equal(bc_trie_lookup(t, "baz"), "lol"); - assert_string_equal(bc_trie_lookup(t, "asd"), "qwe"); - bc_trie_free(t); + assert_int_equal(sb_trie_size(t), 3); + assert_string_equal(sb_trie_lookup(t, "foo"), "bar"); + assert_string_equal(sb_trie_lookup(t, "baz"), "lol"); + assert_string_equal(sb_trie_lookup(t, "asd"), "qwe"); + sb_trie_free(t); } |