aboutsummaryrefslogtreecommitdiffstats
path: root/tests/check_template_parser.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-05-17 23:43:31 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-05-17 23:43:31 -0300
commit64e772c1125acadad8167fd5fd25b380f333ab86 (patch)
treef905c15fe3d3d703c4a7f8531a30482848132e6d /tests/check_template_parser.c
parentd7f5252a0d7c4c428bfbd560ce78b81073d3d6ec (diff)
downloadblogc-64e772c1125acadad8167fd5fd25b380f333ab86.tar.gz
blogc-64e772c1125acadad8167fd5fd25b380f333ab86.tar.bz2
blogc-64e772c1125acadad8167fd5fd25b380f333ab86.zip
template-parser: convert "if" operator into enum
Diffstat (limited to 'tests/check_template_parser.c')
-rw-r--r--tests/check_template_parser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/check_template_parser.c b/tests/check_template_parser.c
index 8ce6e6d..b018a89 100644
--- a/tests/check_template_parser.c
+++ b/tests/check_template_parser.c
@@ -35,11 +35,11 @@ blogc_assert_template_stmt(b_slist_t *l, const char *value,
static void
blogc_assert_template_if_stmt(b_slist_t *l, const char *variable,
- const char *operator, const char *operand)
+ blogc_template_stmt_operator_t operator, const char *operand)
{
blogc_template_stmt_t *stmt = l->data;
assert_string_equal(stmt->value, variable);
- assert_string_equal(stmt->op, operator);
+ assert_int_equal(stmt->op, operator);
assert_string_equal(stmt->value2, operand);
assert_int_equal(stmt->type, BLOGC_TEMPLATE_IF_STMT);
}
@@ -106,7 +106,7 @@ test_template_parse(void **state)
blogc_assert_template_stmt(tmp->next->next->next->next->next->next->next->next->next,
"\n", BLOGC_TEMPLATE_CONTENT_STMT);
tmp = tmp->next->next->next->next->next->next->next->next->next->next;
- blogc_assert_template_if_stmt(tmp, "BOLA", "==", "1\\\"0");
+ blogc_assert_template_if_stmt(tmp, "BOLA", BLOGC_TEMPLATE_OP_EQ, "1\\\"0");
blogc_assert_template_stmt(tmp->next, "aee", BLOGC_TEMPLATE_CONTENT_STMT);
blogc_assert_template_stmt(tmp->next->next, NULL,
BLOGC_TEMPLATE_ENDIF_STMT);