From 6515192306e1c37cea8ec1dddee3556fba44a5d6 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 26 Nov 2016 20:44:52 -0800 Subject: 3694 Fix CI, broken by commit 3691. --- html/029tools.cc.html | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'html/029tools.cc.html') diff --git a/html/029tools.cc.html b/html/029tools.cc.html index 89cd93ad..e8b6b990 100644 --- a/html/029tools.cc.html +++ b/html/029tools.cc.html @@ -224,43 +224,6 @@ put(Recipe_ordinal,break; } -//: assert: perform sanity checks at runtime - -:(scenario assert) -% Hide_errors = true; // '%' lines insert arbitrary C code into tests before calling 'run' with the lines below. Must be immediately after :(scenario) line. -def main [ - assert 0, [this is an assert in Mu] -] -+error: this is an assert in Mu - -:(before "End Primitive Recipe Declarations") -ASSERT, -:(before "End Primitive Recipe Numbers") -put(Recipe_ordinal, "assert", ASSERT); -:(before "End Primitive Recipe Checks") -case ASSERT: { - if (SIZE(inst.ingredients) != 2) { - raise << maybe(get(Recipe, r).name) << "'assert' takes exactly two ingredients rather than '" << inst.original_string << "'\n" << end(); - break; - } - if (!is_mu_scalar(inst.ingredients.at(0))) { - raise << maybe(get(Recipe, r).name) << "'assert' requires a boolean for its first ingredient, but got '" << inst.ingredients.at(0).original_string << "'\n" << end(); - break; - } - if (!is_mu_text(inst.ingredients.at(1))) { - raise << maybe(get(Recipe, r).name) << "'assert' requires a text as its second ingredient, but got '" << inst.ingredients.at(1).original_string << "'\n" << end(); - break; - } - break; -} -:(before "End Primitive Recipe Implementations") -case ASSERT: { - if (!ingredients.at(0).at(0)) { - raise << read_mu_text(ingredients.at(1).at(0)) << '\n' << end(); - } - break; -} - //:: 'cheating' by using the host system :(before "End Primitive Recipe Declarations") -- cgit 1.4.1-2-gfad0