From 4da5313db55794f572e56b875852edbc096aca2f Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Wed, 2 Jul 2025 23:12:28 +0200 Subject: [PATCH] using require instead of check to fail fast --- test/lexer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/lexer.cpp b/test/lexer.cpp index 696b346..8966cef 100644 --- a/test/lexer.cpp +++ b/test/lexer.cpp @@ -31,8 +31,8 @@ TEST_CASE("Single character token") { for (const auto& t : tests) { token::token tok = l.next_token(); - CHECK(tok.type == t.expectedType); - CHECK(tok.literal == t.expectedLiteral); + REQUIRE(tok.type == t.expectedType); + REQUIRE(tok.literal == t.expectedLiteral); } }; @@ -155,7 +155,7 @@ if (5 < 10) {\ for (const auto& t : tests) { token::token tok = l.next_token(); - CHECK(tok.type == t.expectedType); - CHECK(tok.literal == t.expectedLiteral); + REQUIRE(tok.type == t.expectedType); + REQUIRE(tok.literal == t.expectedLiteral); } };