using require instead of check to fail fast

This commit is contained in:
Karma Riuk
2025-07-02 23:12:28 +02:00
parent 896b9001c7
commit 4da5313db5

View File

@@ -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);
}
};