checkign that the casting of the let statement

doesn't throw
This commit is contained in:
Karma Riuk
2025-07-07 15:01:46 +02:00
parent de465b6122
commit bbac513aa9

View File

@@ -10,7 +10,8 @@
void test_let_statement(ast::statement* stmt, const std::string name) { void test_let_statement(ast::statement* stmt, const std::string name) {
REQUIRE(stmt->token_literal() == "let"); REQUIRE(stmt->token_literal() == "let");
ast::let* let_stmt = dynamic_cast<ast::let*>(stmt); ast::let* let_stmt;
REQUIRE_NOTHROW(let_stmt = dynamic_cast<ast::let*>(stmt));
REQUIRE_MESSAGE( REQUIRE_MESSAGE(
let_stmt != nullptr, let_stmt != nullptr,
"Couldn't cast statement to a let statement" "Couldn't cast statement to a let statement"