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. --- 029tools.cc | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to '029tools.cc') diff --git a/029tools.cc b/029tools.cc index 67c58154..474bdc62 100644 --- a/029tools.cc +++ b/029tools.cc @@ -187,43 +187,6 @@ case _SAVE_TRACE: { 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 t' action='/akkartik/mu/log/counters.mu'>
path: root/counters.mu
blob: dab6850f7e530990379ae72307a8364c471d7c99 (plain) (tree)
1
2
3
4
5
6
7
8
9