From 826f4de77abd27ecb4188c708e63e9d51b367934 Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Fri, 11 Jul 2025 11:10:29 +0200 Subject: [PATCH] updated return tests --- test/parser/return.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/parser/return.cpp b/test/parser/return.cpp index 3875a54..90cf0cf 100644 --- a/test/parser/return.cpp +++ b/test/parser/return.cpp @@ -8,13 +8,14 @@ TEST_SUITE("Parser: return") { return 5;\ return 10;\ return 103213;\ +return 12 + 34;\ "); - REQUIRE(program->statements.size() == 3); + REQUIRE(program->statements.size() == 4); for (const auto stmt : program->statements) { - REQUIRE(stmt->token_literal() == "return"); - ast::return_stmt* return_stmt = cast(stmt); + CHECK(stmt->token_literal() == "return"); + cast(stmt); } } }