checkign that the casting of the let statement
doesn't throw
This commit is contained in:
@@ -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"
|
||||||
|
Reference in New Issue
Block a user