From ab17545c932d733afc2ddc92ea44cb1666185b7f Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Sat, 12 Jul 2025 15:04:13 +0200 Subject: [PATCH] made another test for boolean parsing in general expression --- test/parser/expression.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/parser/expression.cpp b/test/parser/expression.cpp index a1fa572..8b80856 100644 --- a/test/parser/expression.cpp +++ b/test/parser/expression.cpp @@ -131,6 +131,8 @@ TEST_SUITE("Parser: expression") { CASE("Infix: '=='", "5 == 5;", 5, "==", 5); CASE("Infix: '!='", "15 != 5;", 15, "!=", 5); CASE("Infix: between identifiers", "alice * bob;", "alice", "*", "bob"); + CASE("Infix: between booleans", "true == bob;", true, "==", "bob"); + CASE("Infix: between booleans", "true != false;", true, "!=", false); #undef CASE } @@ -232,6 +234,8 @@ TEST_SUITE("Parser: expression") { {"5 < 4 != 3 > 4", "((5 < 4) != (3 > 4))"}, {"3 + 4 * 5 == 3 * 1 + 4 * 5", "((3 + (4 * 5)) == ((3 * 1) + (4 * 5)))"}, + {"3 > 5 == false", "((3 > 5) == false)"}, + {"3 < 5 == true", "((3 < 5) == true)"}, }; for (auto& t : tests) {