summaryrefslogtreecommitdiff
path: root/test/parser_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/parser_test.c')
-rw-r--r--test/parser_test.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/parser_test.c b/test/parser_test.c
index 43eb27b..8565dc8 100644
--- a/test/parser_test.c
+++ b/test/parser_test.c
@@ -320,35 +320,35 @@ test_parse_all_boolean_expression(const MunitParameter params[], void *user_data
ast_node_t *exp1 = ast_expression;
assert_int(TYPE_BOOL, ==, exp1->result_type);
- assert_int(AST_BINOP_NOT_EQUAL, ==, exp1->data.binary_operation.kind);
+ assert_int(AST_BINOP_AND, ==, exp1->data.binary_operation.kind);
ast_node_t *exp2 = exp1->data.binary_operation.left;
assert_int(TYPE_BOOL, ==, exp2->result_type);
- assert_int(AST_BINOP_EQUAL, ==, exp2->data.binary_operation.kind);
+ assert_int(AST_BINOP_OR, ==, exp2->data.binary_operation.kind);
- ast_node_t *exp3 = exp2->data.binary_operation.left;
+ ast_node_t *exp3 = exp1->data.binary_operation.right;
assert_int(TYPE_BOOL, ==, exp3->result_type);
- assert_int(AST_BINOP_LT_EQUAL, ==, exp3->data.binary_operation.kind);
+ assert_int(AST_BINOP_NOT_EQUAL, ==, exp3->data.binary_operation.kind);
ast_node_t *exp4 = exp3->data.binary_operation.left;
assert_int(TYPE_BOOL, ==, exp4->result_type);
- assert_int(AST_BINOP_GT_EQUAL, ==, exp4->data.binary_operation.kind);
+ assert_int(AST_BINOP_EQUAL, ==, exp4->data.binary_operation.kind);
ast_node_t *exp5 = exp4->data.binary_operation.left;
assert_int(TYPE_BOOL, ==, exp5->result_type);
- assert_int(AST_BINOP_LT, ==, exp5->data.binary_operation.kind);
+ assert_int(AST_BINOP_LT_EQUAL, ==, exp5->data.binary_operation.kind);
ast_node_t *exp6 = exp5->data.binary_operation.left;
assert_int(TYPE_BOOL, ==, exp6->result_type);
- assert_int(AST_BINOP_GT, ==, exp6->data.binary_operation.kind);
+ assert_int(AST_BINOP_GT_EQUAL, ==, exp6->data.binary_operation.kind);
ast_node_t *exp7 = exp6->data.binary_operation.left;
assert_int(TYPE_BOOL, ==, exp7->result_type);
- assert_int(AST_BINOP_AND, ==, exp7->data.binary_operation.kind);
+ assert_int(AST_BINOP_LT, ==, exp7->data.binary_operation.kind);
ast_node_t *exp8 = exp7->data.binary_operation.left;
assert_int(TYPE_BOOL, ==, exp8->result_type);
- assert_int(AST_BINOP_OR, ==, exp8->data.binary_operation.kind);
+ assert_int(AST_BINOP_GT, ==, exp8->data.binary_operation.kind);
ast_node_destroy(ast_expression);
scope_destroy(scope);