minigrace
Version:
A compiler for the Grace programming language
881 lines (880 loc) • 48.5 kB
JavaScript
let gracecode_minitestBundle_sourceFile = "/Users/black/Development/mg/gracelang/minigrace/modules/minitestBundle.grace";
let gracecode_minitestBundle_sha256 = "cb988c3e6984249c7421cfb953d942c8cc54fd966d88ec41a49bf39139d71ecc";
let gracecode_minitestBundle_minigraceRevision = "b57591d29fc5ee5270d114920bf671367b8c3ecb";
let gracecode_minitestBundle_minigraceGeneration = "5171";
if (typeof gctCache !== "undefined")
gctCache["minitestBundle"] = "dialect:\n standard\nfreshScopes:\n $102 trait\n $103 trait\nmethodTypes:$102:\n numberOfErrorsToRerun \u2192 Number\n numberOfErrorsToRerun:=(n:Number) \u2192 Unknown\n test(name:String)by(block:Procedure0) \u2192 Unknown\n testCaseNamed(name':Unknown)setupIn(setupBlock:Unknown)asTestNumber(number:Unknown) \u2192 gu.TestCase\n testSuite(block:Procedure0) \u2192 Unknown\n testSuite(name:String)with(block:Procedure0) \u2192 Unknown\nmodules:\n gUnit\n standard\npath:\n /Users/black/Development/mg/gracelang/minigrace/modules/minitestBundle.grace\nscope:$101:\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n isMe(1) Boolean (go) $scope_boolean\n myIdentityHash Number (go) $scope_number\n open Unknown (mth) $102\nscope:$102:\n AssertionFailure Unknown (mth) $scope_done\n MinitestError Unknown (mth) $scope_done\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n assert(1) Unknown (mth) $scope_done\n assert(1)description(1) Unknown (mth) $scope_done\n assert(1)hasType(1) Unknown (mth) $scope_done\n assert(1)shouldBe(1) Unknown (mth) $scope_done\n assert(1)shouldEqual(1)within(1) Unknown (mth) $scope_done\n assert(1)shouldRaise(1) Unknown (mth) $scope_done\n assert(1)shouldRaise(1)matchedBy(1) Unknown (mth) $scope_done\n assert(1)shouldRaise(1)mentioning(1) Unknown (mth) $scope_done\n assert(1)shouldRaise(1)mentioning(1)and(1) Unknown (mth) $scope_done\n assert(1)shouldntBe(1) Unknown (mth) $scope_done\n assert(1)shouldntRaise(1) Unknown (mth) $scope_done\n assertType(1)describes(1) Unknown (mth) $scope_done\n assertType(1)exactlyDescribes(1) Unknown (mth) $scope_done\n basicAsString String (go) $scope_string\n countOneAssertion Unknown (mth) $scope_done\n deny(1) Unknown (mth) $scope_done\n deny(1)description(1) Unknown (mth) $scope_done\n deny(1)hasType(1) Unknown (mth) $scope_done\n deny(1)shouldBe(1) Unknown (mth) $scope_done\n doNotRerunErrors Unknown (mth) $scope_done\n doRerunErrors Unknown (mth) $scope_done\n exit Unknown (mth) $scope_done\n failBecause(1) Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n methodsIn(1)missingFrom(1) String (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n numberOfErrorsToRerun Number (mth) $scope_done\n numberOfErrorsToRerun:=(1) Unknown (mth) $scope_done\n protocolOf(1)notCoveredBy(1) String (mth) $scope_done\n test(1)by(1) Unknown (mth) $scope_done\n testCaseNamed(1)setupIn(1)asTestNumber(1) TestCase (mth) $103\n testSuite(1) Unknown (mth) $scope_done\n testSuite(1)with(1) Unknown (mth) $scope_done\n testSuiteNamed(1)with(1) Unknown (mth) $scope_done\nscope:$103:\n AssertionFailure Unknown (mth) $scope_done\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n assert(1) Unknown (mth) $scope_done\n assert(1)description(1) Unknown (mth) $scope_done\n assert(1)hasType(1) Unknown (mth) $scope_done\n assert(1)shouldBe(1) Unknown (mth) $scope_done\n assert(1)shouldEqual(1)within(1) Unknown (mth) $scope_done\n assert(1)shouldRaise(1) Unknown (mth) $scope_done\n assert(1)shouldRaise(1)matchedBy(1) Unknown (mth) $scope_done\n assert(1)shouldRaise(1)mentioning(1) Unknown (mth) $scope_done\n assert(1)shouldRaise(1)mentioning(1)and(1) Unknown (mth) $scope_done\n assert(1)shouldntBe(1) Unknown (mth) $scope_done\n assert(1)shouldntRaise(1) Unknown (mth) $scope_done\n assertType(1)describes(1) Unknown (mth) $scope_done\n assertType(1)exactlyDescribes(1) Unknown (mth) $scope_done\n basicAsString String (go) $scope_string\n countOneAssertion Unknown (mth) $scope_done\n currentResult Unknown (mth) $scope_done override\n currentResult:=(1) Unknown (mth) $scope_done override\n debug(1) Unknown (mth) $scope_done\n debugAndPrintResults Unknown (mth) $scope_done\n deny(1) Unknown (mth) $scope_done\n deny(1)description(1) Unknown (mth) $scope_done\n deny(1)hasType(1) Unknown (mth) $scope_done\n deny(1)shouldBe(1) Unknown (mth) $scope_done\n failBecause(1) Unknown (mth) $scope_done\n guSetup Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n methodsIn(1)missingFrom(1) String (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n name Unknown (mth) $scope_done\n printBackTrace(1)limitedTo(1) Unknown (mth) $scope_done\n protocolOf(1)notCoveredBy(1) String (mth) $scope_done\n run(1) Unknown (mth) $scope_done\n runAndPrintResults Unknown (mth) $scope_done\n runTest Unknown (mth) $scope_done override\n setup Unknown (mth) $scope_done\n size Unknown (def) $scope_number\n teardown Unknown (mth) $scope_done\nself:\n $101\ntypes:\n";
if (typeof originalSourceLines !== "undefined") {
originalSourceLines["minitestBundle"] = [
"dialect \"standard\"",
"",
"import \"gUnit\" as gu",
"",
"def nullSuite = singleton \"nullSuite\"",
"def nullBlock = singleton \"nullBlock\"",
"",
"var currentTestSuiteForDialect := nullSuite",
"var currentSetupBlockForTesting := nullBlock",
"var currentTestBlockForTesting := 0",
"var currentTestInThisEvaluation := 0",
"var errorsToBeRerun := true",
"var currentResult := object {",
" method countOneAssertion {",
" print \"countOneAssertion requested on dummy result\"",
" }",
"}",
"",
"trait open {",
" use gu.assertion // makes available all the assert ... methods",
"",
" method countOneAssertion {",
" currentResult.countOneAssertion",
" }",
" once method MinitestError {",
" self.ProgrammingError.refine \"MinitestError\"",
" }",
" method numberOfErrorsToRerun -> Number { gu.numberOfErrorsToRerun }",
" method numberOfErrorsToRerun:=(n:Number) {",
" gu.numberOfErrorsToRerun := n",
" }",
" method testSuite (name:String) with (block:Procedure0) {",
" if (nullSuite ≠ currentTestSuiteForDialect) then {",
" MinitestError.raise \"a testSuite cannot be created inside a testSuite\"",
" }",
" currentTestSuiteForDialect := gu.testSuite.empty",
" currentTestSuiteForDialect.name := name",
" currentSetupBlockForTesting := block",
" currentTestInThisEvaluation := 0",
" block.apply",
" currentSetupBlockForTesting := nullBlock",
" currentTestSuiteForDialect.runAndPrintResults",
" currentTestSuiteForDialect := nullSuite",
" currentTestBlockForTesting := 0",
" }",
"",
" method testSuiteNamed(name) with (block) {",
" // for backward compatibility",
" testSuite (name) with (block)",
" }",
"",
" method doNotRerunErrors { errorsToBeRerun := false }",
" method doRerunErrors { errorsToBeRerun := true }",
"",
" method testSuite (block:Procedure0) {",
" testSuite \"\" with (block)",
" }",
"",
" method exit { gu.exit }",
"",
" method test(name:String) by(block:Procedure0) {",
" if (nullSuite == currentTestSuiteForDialect) then {",
" MinitestError.raise \"a test can be created only within a testSuite\"",
" }",
" currentTestInThisEvaluation := currentTestInThisEvaluation + 1",
" if (nullBlock ≠ currentSetupBlockForTesting) then {",
" currentTestSuiteForDialect.add(testCaseNamed(name)",
" setupIn(currentSetupBlockForTesting)",
" asTestNumber(currentTestInThisEvaluation))",
" } elseif { currentTestInThisEvaluation == currentTestBlockForTesting } then {",
" block.apply",
" }",
" }",
"",
" class testCaseNamed(name') setupIn(setupBlock) asTestNumber(number) -> gu.TestCase {",
" inherit gu.testCaseNamed(name') alias guSetup = setup",
"",
" method setup {",
" guSetup",
" currentTestBlockForTesting := number",
" currentTestInThisEvaluation := 0",
" setupBlock.apply",
" }",
"",
" method teardown {",
" currentTestBlockForTesting := 0",
" }",
"",
" method currentResult:= (r) is override {",
" outer.outer.currentResult := r",
" }",
"",
" method currentResult is override { outer.outer.currentResult }",
"",
" method runTest is override {",
" // for minitest, the test is run in setup",
" }",
" }",
"}" ];
}
function gracecode_minitestBundle() {
importedModules["minitestBundle"] = this;
const var_$module = this;
this.definitionModule = "minitestBundle";
this.definitionLine = 1;
setLineNumber(1); // compilenode dialect
// Dialect "standard"
const var_$dialect = do_import("standard", gracecode_standard);
this.outer = var_$dialect;
setLineNumber(3); // compilenode import
// Import of "gUnit" as gu
if (typeof gracecode_gUnit == "undefined")
throw new GraceExceptionPacket(EnvironmentExceptionObject,
new GraceString("could not find module gUnit"));
var var_gu = do_import("gUnit", gracecode_gUnit);
var func0 = function(argcv) { // accessor method gu, line 3
const numArgs = arguments.length - 1;
if (numArgs > 0) raiseTypeArgError("gu", 0, numArgs - 0);
return var_gu;
}; // end of method gu
this.methods["gu"] = func0;
func0.methodName = "gu";
func0.paramCounts = [0];
func0.paramNames = [];
func0.definitionLine = 3;
func0.definitionModule = "minitestBundle";
func0.debug = "import";
func0.confidential = true;
this.closureKeys = this.closureKeys || [];
this.closureKeys.push("outer_minitestBundle_1");
this.outer_minitestBundle_1 = var_$dialect;
var func1 = function(argcv) { // method open, line 19
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 0) && (numArgs !== 0)) {
raiseTypeArgError("open", 0, numArgs - 0);
}
var ouc = emptyGraceObject("open", "minitestBundle", 19);
var ouc_init = this.methods["open$build(3)"].call(this, null, ouc, [], []);
ouc_init.call(ouc);
return ouc;
}; // end of method open
this.methods["open"] = func1;
func1.methodName = "open";
func1.paramCounts = [0];
func1.paramNames = [];
func1.definitionLine = 19;
func1.definitionModule = "minitestBundle";
var func2 = function(argcv, inheritingObject, aliases, exclusions) { // method open$build(_,_,_), line 19
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 4;
if ((numArgs > 0) && (numArgs !== 0)) {
raiseTypeArgError("open", 0, numArgs - 0);
}
var obj3_build = function(ignore, outerObj, aliases, exclusions) {
this.closureKeys = this.closureKeys || [];
this.closureKeys.push("outer_minitestBundle_19");
this.outer_minitestBundle_19 = outerObj;
const inheritedExclusions = { };
for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) {
const exMeth = exclusions[eix];
inheritedExclusions[exMeth] = this.methods[exMeth]; };
setLineNumber(20); // reuse call
var initFun4 = request(var_gu, "assertion$build(3)", [null], this, [], []); // compileReuseCall
var func5 = function(argcv) { // method countOneAssertion, line 22
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 0) && (numArgs !== 0)) {
raiseTypeArgError("countOneAssertion", 0, numArgs - 0);
}
setLineNumber(23); // compilenode member
// call case 4: other requests
if (var_currentResult === undefined) raiseUninitializedVariable("currentResult");
var call6 = request(var_currentResult, "countOneAssertion", [0]);
return call6;
}; // end of method countOneAssertion
this.methods["countOneAssertion"] = func5;
func5.methodName = "countOneAssertion";
func5.paramCounts = [0];
func5.paramNames = [];
func5.definitionLine = 22;
func5.definitionModule = "minitestBundle";
var func7 = function(argcv) { // method MinitestError, line 25
var returnTarget = invocationCount;
invocationCount++;
setLineNumber(26); // compilenode string
var string9 = new GraceString("MinitestError");
// call case 4: other requests
var call10 = selfRequest(this, "ProgrammingError", [0]);
var call8 = request(call10, "refine(1)", [1], string9);
return call8;
}; // end of method MinitestError
function memofunc7(argcv) {
if (! this.data["memo$MinitestError"]) // parameterless memo function
this.data["memo$MinitestError"] = func7.call(this, argcv);
return this.data["memo$MinitestError"];
};
this.methods["MinitestError"] = memofunc7;
memofunc7.methodName = "MinitestError";
memofunc7.paramCounts = [0];
memofunc7.paramNames = [];
memofunc7.definitionLine = 25;
memofunc7.definitionModule = "minitestBundle";
func7.methodName = "MinitestError";
func7.paramCounts = [0];
func7.paramNames = [];
func7.definitionLine = 25;
func7.definitionModule = "minitestBundle";
var func11 = function(argcv) { // method numberOfErrorsToRerun, line 28
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 0) && (numArgs !== 0)) {
raiseTypeArgError("numberOfErrorsToRerun", 0, numArgs - 0);
}
setLineNumber(28); // compilenode member
// call case 4: other requests
var call12 = request(var_gu, "numberOfErrorsToRerun", [0]);
var call13 = selfRequest(var_$dialect, "Number", [0]);
assertTypeOrMsg(call12, call13, "result of method numberOfErrorsToRerun", "Number");
return call12;
}; // end of method numberOfErrorsToRerun
var call14 = selfRequest(var_$dialect, "Number", [0]);
func11.returnType = call14;
this.methods["numberOfErrorsToRerun"] = func11;
func11.methodName = "numberOfErrorsToRerun";
func11.paramCounts = [0];
func11.paramNames = [];
func11.definitionLine = 28;
func11.definitionModule = "minitestBundle";
var func15 = function(argcv, var_n) { // method numberOfErrorsToRerun:=(_), line 29
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 1) && (numArgs !== 1)) {
raiseTypeArgError("numberOfErrorsToRerun:=(_)", 0, numArgs - 1);
}
setLineNumber(29); // compilenode member
var call16 = selfRequest(var_$dialect, "Number", [0]);
assertTypeOrMsg(var_n, call16, "argument to request of `numberOfErrorsToRerun:=(_)`", "Number");
setLineNumber(30); // compilenode call
// call case 4: other requests
var call17 = request(var_gu, "numberOfErrorsToRerun:=(1)", [1], var_n);
return call17;
}; // end of method numberOfErrorsToRerun:=(_)
setLineNumber(29); // compilenode member
var call18 = selfRequest(var_$dialect, "Number", [0]);
func15.paramTypes = [call18];
this.methods["numberOfErrorsToRerun:=(1)"] = func15;
func15.methodName = "numberOfErrorsToRerun:=(1)";
func15.paramCounts = [1];
func15.paramNames = ["n"];
func15.definitionLine = 29;
func15.definitionModule = "minitestBundle";
var func19 = function(argcv, var_name, var_block) { // method testSuite(_)with(_), line 32
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 2) && (numArgs !== 2)) {
raiseTypeArgError("testSuite(_)with(_)", 0, numArgs - 2);
}
setLineNumber(32); // compilenode member
var call20 = selfRequest(var_$dialect, "String", [0]);
assertTypeOrMsg(var_name, call20, "argument 1 in request of `testSuite(_)with(_)`", "String");
var call21 = selfRequest(var_$dialect, "Procedure0", [0]);
assertTypeOrMsg(var_block, call21, "argument 2 in request of `testSuite(_)with(_)`", "Procedure0");
var if22 = GraceDone;
setLineNumber(33); // compilenode op
if (var_currentTestSuiteForDialect === undefined) raiseUninitializedVariable("currentTestSuiteForDialect");
// call case 4: other requests
if (var_nullSuite === undefined) raiseUninitializedVariable("nullSuite");
var term23 = request(var_nullSuite, "\u2260(1)", [1], var_currentTestSuiteForDialect);
if (Grace_isTrue(term23)) {
setLineNumber(34); // compilenode string
var string25 = new GraceString("a testSuite cannot be created inside a testSuite");
// call case 4: other requests
var call26 = selfRequest(this, "MinitestError", [0]);
var call24 = request(call26, "raise(1)", [1], string25);
if22 = call24;
}
setLineNumber(36); // compilenode member
// call case 4: other requests
// call case 4: other requests
var call29 = request(var_gu, "testSuite", [0]);
var call28 = request(call29, "empty", [0]);
var call27 = selfRequest(var_$module, "currentTestSuiteForDialect:=(1)", [1], call28);
setLineNumber(37); // compilenode call
// call case 4: other requests
var call30 = request(var_currentTestSuiteForDialect, "name:=(1)", [1], var_name);
setLineNumber(38); // compilenode call
var call31 = selfRequest(var_$module, "currentSetupBlockForTesting:=(1)", [1], var_block);
setLineNumber(39); // compilenode num
var call32 = selfRequest(var_$module, "currentTestInThisEvaluation:=(1)", [1], new GraceNum(0));
setLineNumber(40); // compilenode member
// call case 4: other requests
var call33 = request(var_block, "apply", [0]);
setLineNumber(41); // compilenode call
if (var_nullBlock === undefined) raiseUninitializedVariable("nullBlock");
var call34 = selfRequest(var_$module, "currentSetupBlockForTesting:=(1)", [1], var_nullBlock);
setLineNumber(42); // compilenode member
// call case 4: other requests
var call35 = request(var_currentTestSuiteForDialect, "runAndPrintResults", [0]);
setLineNumber(43); // compilenode call
var call36 = selfRequest(var_$module, "currentTestSuiteForDialect:=(1)", [1], var_nullSuite);
setLineNumber(44); // compilenode num
var call37 = selfRequest(var_$module, "currentTestBlockForTesting:=(1)", [1], new GraceNum(0));
return call37;
}; // end of method testSuite(_)with(_)
setLineNumber(32); // compilenode member
var call38 = selfRequest(var_$dialect, "String", [0]);
var call39 = selfRequest(var_$dialect, "Procedure0", [0]);
func19.paramTypes = [call38, call39];
this.methods["testSuite(1)with(1)"] = func19;
func19.methodName = "testSuite(1)with(1)";
func19.paramCounts = [1, 1];
func19.paramNames = ["name", "block"];
func19.definitionLine = 32;
func19.definitionModule = "minitestBundle";
var func40 = function(argcv, var_name, var_block) { // method testSuiteNamed(_)with(_), line 47
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 2) && (numArgs !== 2)) {
raiseTypeArgError("testSuiteNamed(_)with(_)", 0, numArgs - 2);
}
setLineNumber(49); // compilenode call
var call41 = selfRequest(this, "testSuite(1)with(1)", [1, 1], var_name, var_block);
return call41;
}; // end of method testSuiteNamed(_)with(_)
this.methods["testSuiteNamed(1)with(1)"] = func40;
func40.methodName = "testSuiteNamed(1)with(1)";
func40.paramCounts = [1, 1];
func40.paramNames = ["name", "block"];
func40.definitionLine = 47;
func40.definitionModule = "minitestBundle";
var func42 = function(argcv) { // method doNotRerunErrors, line 52
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 0) && (numArgs !== 0)) {
raiseTypeArgError("doNotRerunErrors", 0, numArgs - 0);
}
setLineNumber(52); // compilenode member
var call43 = selfRequest(var_$module, "errorsToBeRerun:=(1)", [1], GraceFalse);
return call43;
}; // end of method doNotRerunErrors
this.methods["doNotRerunErrors"] = func42;
func42.methodName = "doNotRerunErrors";
func42.paramCounts = [0];
func42.paramNames = [];
func42.definitionLine = 52;
func42.definitionModule = "minitestBundle";
var func45 = function(argcv) { // method doRerunErrors, line 53
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 0) && (numArgs !== 0)) {
raiseTypeArgError("doRerunErrors", 0, numArgs - 0);
}
setLineNumber(53); // compilenode member
var call46 = selfRequest(var_$module, "errorsToBeRerun:=(1)", [1], GraceTrue);
return call46;
}; // end of method doRerunErrors
this.methods["doRerunErrors"] = func45;
func45.methodName = "doRerunErrors";
func45.paramCounts = [0];
func45.paramNames = [];
func45.definitionLine = 53;
func45.definitionModule = "minitestBundle";
var func48 = function(argcv, var_block) { // method testSuite(_), line 55
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 1) && (numArgs !== 1)) {
raiseTypeArgError("testSuite(_)", 0, numArgs - 1);
}
setLineNumber(55); // compilenode member
var call49 = selfRequest(var_$dialect, "Procedure0", [0]);
assertTypeOrMsg(var_block, call49, "argument to request of `testSuite(_)`", "Procedure0");
setLineNumber(56); // compilenode string
var call50 = selfRequest(this, "testSuite(1)with(1)", [1, 1], GraceEmptyString, var_block);
return call50;
}; // end of method testSuite(_)
setLineNumber(55); // compilenode member
var call51 = selfRequest(var_$dialect, "Procedure0", [0]);
func48.paramTypes = [call51];
this.methods["testSuite(1)"] = func48;
func48.methodName = "testSuite(1)";
func48.paramCounts = [1];
func48.paramNames = ["block"];
func48.definitionLine = 55;
func48.definitionModule = "minitestBundle";
var func52 = function(argcv) { // method exit, line 59
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 0) && (numArgs !== 0)) {
raiseTypeArgError("exit", 0, numArgs - 0);
}
setLineNumber(59); // compilenode member
// call case 4: other requests
var call53 = request(var_gu, "exit", [0]);
return call53;
}; // end of method exit
this.methods["exit"] = func52;
func52.methodName = "exit";
func52.paramCounts = [0];
func52.paramNames = [];
func52.definitionLine = 59;
func52.definitionModule = "minitestBundle";
var func54 = function(argcv, var_name, var_block) { // method test(_)by(_), line 61
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 2) && (numArgs !== 2)) {
raiseTypeArgError("test(_)by(_)", 0, numArgs - 2);
}
setLineNumber(61); // compilenode member
var call55 = selfRequest(var_$dialect, "String", [0]);
assertTypeOrMsg(var_name, call55, "argument 1 in request of `test(_)by(_)`", "String");
var call56 = selfRequest(var_$dialect, "Procedure0", [0]);
assertTypeOrMsg(var_block, call56, "argument 2 in request of `test(_)by(_)`", "Procedure0");
var if57 = GraceDone;
setLineNumber(62); // compilenode op
if (var_currentTestSuiteForDialect === undefined) raiseUninitializedVariable("currentTestSuiteForDialect");
// call case 4: other requests
if (var_nullSuite === undefined) raiseUninitializedVariable("nullSuite");
var term58 = request(var_nullSuite, "==(1)", [1], var_currentTestSuiteForDialect);
if (Grace_isTrue(term58)) {
setLineNumber(63); // compilenode string
var string60 = new GraceString("a test can be created only within a testSuite");
// call case 4: other requests
var call61 = selfRequest(this, "MinitestError", [0]);
var call59 = request(call61, "raise(1)", [1], string60);
if57 = call59;
}
setLineNumber(65); // compilenode num
// call case 4: other requests
if (var_currentTestInThisEvaluation === undefined) raiseUninitializedVariable("currentTestInThisEvaluation");
var sum63 = request(var_currentTestInThisEvaluation, "+(1)", [1], new GraceNum(1));
var call62 = selfRequest(var_$module, "currentTestInThisEvaluation:=(1)", [1], sum63);
var if64 = GraceDone;
setLineNumber(66); // compilenode op
if (var_currentSetupBlockForTesting === undefined) raiseUninitializedVariable("currentSetupBlockForTesting");
// call case 4: other requests
if (var_nullBlock === undefined) raiseUninitializedVariable("nullBlock");
var term65 = request(var_nullBlock, "\u2260(1)", [1], var_currentSetupBlockForTesting);
if (Grace_isTrue(term65)) {
setLineNumber(67); // compilenode call
if (var_currentSetupBlockForTesting === undefined) raiseUninitializedVariable("currentSetupBlockForTesting");
if (var_currentTestInThisEvaluation === undefined) raiseUninitializedVariable("currentTestInThisEvaluation");
var call67 = selfRequest(this, "testCaseNamed(1)setupIn(1)asTestNumber(1)", [1, 1, 1], var_name, var_currentSetupBlockForTesting, var_currentTestInThisEvaluation);
// call case 4: other requests
if (var_currentTestSuiteForDialect === undefined) raiseUninitializedVariable("currentTestSuiteForDialect");
var call66 = request(var_currentTestSuiteForDialect, "add(1)", [1], call67);
if64 = call66;
} else {
var if68 = GraceDone;
setLineNumber(70); // compilenode op
if (var_currentTestBlockForTesting === undefined) raiseUninitializedVariable("currentTestBlockForTesting");
// call case 4: other requests
if (var_currentTestInThisEvaluation === undefined) raiseUninitializedVariable("currentTestInThisEvaluation");
var term69 = request(var_currentTestInThisEvaluation, "==(1)", [1], var_currentTestBlockForTesting);
if (Grace_isTrue(term69)) {
setLineNumber(71); // compilenode member
// call case 4: other requests
var call70 = request(var_block, "apply", [0]);
if68 = call70;
}
if64 = if68;
}
return if64;
}; // end of method test(_)by(_)
setLineNumber(61); // compilenode member
var call71 = selfRequest(var_$dialect, "String", [0]);
var call72 = selfRequest(var_$dialect, "Procedure0", [0]);
func54.paramTypes = [call71, call72];
this.methods["test(1)by(1)"] = func54;
func54.methodName = "test(1)by(1)";
func54.paramCounts = [1, 1];
func54.paramNames = ["name", "block"];
func54.definitionLine = 61;
func54.definitionModule = "minitestBundle";
var func73 = function(argcv, var_name__39__, var_setupBlock, var_number) { // method testCaseNamed(_)setupIn(_)asTestNumber(_), line 75
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 3) && (numArgs !== 3)) {
raiseTypeArgError("testCaseNamed(_)setupIn(_)asTestNumber(_)", 0, numArgs - 3);
}
var ouc = emptyGraceObject("open.testCaseNamed(_)setupIn(_)asTestNumber(_)", "minitestBundle", 75);
var ouc_init = this.methods["testCaseNamed(1)setupIn(1)asTestNumber(1)$build(3)"].call(this, null, var_name__39__, var_setupBlock, var_number, ouc, [], []);
ouc_init.call(ouc);
setLineNumber(75); // compilenode member
// call case 4: other requests
var call74 = request(var_gu, "TestCase", [0]);
setLineNumber(98); // typecheck
assertTypeOrMsg(ouc, call74, "object returned from testCaseNamed(_)setupIn(_)asTestNumber(_)", "gu.TestCase");
return ouc;
}; // end of method testCaseNamed(_)setupIn(_)asTestNumber(_)
setLineNumber(75); // compilenode member
// call case 4: other requests
var call75 = request(var_gu, "TestCase", [0]);
func73.returnType = call75;
this.methods["testCaseNamed(1)setupIn(1)asTestNumber(1)"] = func73;
func73.methodName = "testCaseNamed(1)setupIn(1)asTestNumber(1)";
func73.paramCounts = [1, 1, 1];
func73.paramNames = ["name'", "setupBlock", "number"];
func73.definitionLine = 75;
func73.definitionModule = "minitestBundle";
var func76 = function(argcv, var_name__39__, var_setupBlock, var_number, inheritingObject, aliases, exclusions) { // method testCaseNamed(_)setupIn(_)asTestNumber(_)$build(_,_,_), line 75
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 4;
if ((numArgs > 3) && (numArgs !== 3)) {
raiseTypeArgError("testCaseNamed(_)setupIn(_)asTestNumber(_)", 0, numArgs - 3);
}
var obj77_build = function(ignore, var_name__39__, var_setupBlock, var_number, outerObj, aliases, exclusions) {
this.closureKeys = this.closureKeys || [];
this.closureKeys.push("outer_minitestBundle_75");
this.outer_minitestBundle_75 = outerObj;
const inheritedExclusions = { };
for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) {
const exMeth = exclusions[eix];
inheritedExclusions[exMeth] = this.methods[exMeth]; };
setLineNumber(76); // reuse call
var initFun78 = request(var_gu, "testCaseNamed(1)$build(3)", [null], var_name__39__, this, [new Alias("guSetup", "setup")], []); // compileReuseCall
var func79 = function(argcv) { // method setup, line 78
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 0) && (numArgs !== 0)) {
raiseTypeArgError("setup", 0, numArgs - 0);
}
setLineNumber(79); // compilenode member
var call80 = selfRequest(this, "guSetup", [0]);
setLineNumber(80); // compilenode call
var call81 = selfRequest(var_$module, "currentTestBlockForTesting:=(1)", [1], var_number);
setLineNumber(81); // compilenode num
var call82 = selfRequest(var_$module, "currentTestInThisEvaluation:=(1)", [1], new GraceNum(0));
setLineNumber(82); // compilenode member
// call case 4: other requests
var call83 = request(var_setupBlock, "apply", [0]);
return call83;
}; // end of method setup
this.methods["setup"] = func79;
func79.methodName = "setup";
func79.paramCounts = [0];
func79.paramNames = [];
func79.definitionLine = 78;
func79.definitionModule = "minitestBundle";
var func84 = function(argcv) { // method teardown, line 85
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 0) && (numArgs !== 0)) {
raiseTypeArgError("teardown", 0, numArgs - 0);
}
setLineNumber(86); // compilenode num
var call85 = selfRequest(var_$module, "currentTestBlockForTesting:=(1)", [1], new GraceNum(0));
return call85;
}; // end of method teardown
this.methods["teardown"] = func84;
func84.methodName = "teardown";
func84.paramCounts = [0];
func84.paramNames = [];
func84.definitionLine = 85;
func84.definitionModule = "minitestBundle";
var func86 = function(argcv, var_r) { // method currentResult:=(_), line 89
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 1) && (numArgs !== 1)) {
raiseTypeArgError("currentResult:=(_)", 0, numArgs - 1);
}
setLineNumber(90); // compilenode yourself
var call87 = selfRequest(this.outer_minitestBundle_75.outer_minitestBundle_19, "currentResult:=(1)", [1], var_r);
return call87;
}; // end of method currentResult:=(_)
this.methods["currentResult:=(1)"] = func86;
func86.methodName = "currentResult:=(1)";
func86.paramCounts = [1];
func86.paramNames = ["r"];
func86.definitionLine = 89;
func86.definitionModule = "minitestBundle";
var func88 = function(argcv) { // method currentResult, line 93
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 0) && (numArgs !== 0)) {
raiseTypeArgError("currentResult", 0, numArgs - 0);
}
setLineNumber(93); // compilenode yourself
var call89 = selfRequest(this.outer_minitestBundle_75.outer_minitestBundle_19, "currentResult", [0]);
return call89;
}; // end of method currentResult
this.methods["currentResult"] = func88;
func88.methodName = "currentResult";
func88.paramCounts = [0];
func88.paramNames = [];
func88.definitionLine = 93;
func88.definitionModule = "minitestBundle";
var func90 = function(argcv) { // method runTest, line 95
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 0) && (numArgs !== 0)) {
raiseTypeArgError("runTest", 0, numArgs - 0);
}
return GraceDone;
}; // end of method runTest
this.methods["runTest"] = func90;
func90.methodName = "runTest";
func90.paramCounts = [0];
func90.paramNames = [];
func90.definitionLine = 95;
func90.definitionModule = "minitestBundle";
const overridenByAliases = { };
for (let aix = 0, aLen = aliases.length; aix < aLen; aix ++) {
const a = aliases[aix];
const newNm = a.newName;
const oldNm = a.oldName;
overridenByAliases[newNm] = this.methods[newNm];
const m = confidentialVersion(overridenByAliases[oldNm] || this.methods[oldNm], newNm);
m.definitionLine = 75;
m.definitionModule = "minitestBundle";
this.methods[newNm] = m;
}
for (let exName in inheritedExclusions) {
if (inheritedExclusions.hasOwnProperty(exName)) {
if (inheritedExclusions[exName]) {
this.methods[exName] = inheritedExclusions[exName];
} else {
delete this.methods[exName];
}
}
}
var obj77_init = function() { // init of object on line 75
initFun78.call(this);
};
return obj77_init; // from compileBuildAndInitFunctions(_)inMethod(_)
};
var obj77_init = obj77_build.call(inheritingObject, null, var_name__39__, var_setupBlock, var_number, this, aliases, exclusions);
return obj77_init; // from compileBuildMethodFor(_)withObjCon(_)inside(_)
}; // end of method testCaseNamed(_)setupIn(_)asTestNumber(_)$build(_,_,_)
setLineNumber(75); // compilenode member
// call case 4: other requests
var call91 = request(var_gu, "TestCase", [0]);
func76.returnType = call91;
this.methods["testCaseNamed(1)setupIn(1)asTestNumber(1)$build(3)"] = func76;
func76.methodName = "testCaseNamed(1)setupIn(1)asTestNumber(1)$build(3)";
func76.paramCounts = [1, 1, 1];
func76.paramNames = ["name'", "setupBlock", "number"];
func76.definitionLine = 75;
func76.definitionModule = "minitestBundle";
const overridenByAliases = { };
for (let aix = 0, aLen = aliases.length; aix < aLen; aix ++) {
const a = aliases[aix];
const newNm = a.newName;
const oldNm = a.oldName;
overridenByAliases[newNm] = this.methods[newNm];
const m = confidentialVersion(overridenByAliases[oldNm] || this.methods[oldNm], newNm);
m.definitionLine = 19;
m.definitionModule = "minitestBundle";
this.methods[newNm] = m;
}
for (let exName in inheritedExclusions) {
if (inheritedExclusions.hasOwnProperty(exName)) {
if (inheritedExclusions[exName]) {
this.methods[exName] = inheritedExclusions[exName];
} else {
delete this.methods[exName];
}
}
}
var obj3_init = function() { // init of object on line 19
};
return obj3_init; // from compileBuildAndInitFunctions(_)inMethod(_)
};
var obj3_init = obj3_build.call(inheritingObject, null, this, aliases, exclusions);
return obj3_init; // from compileBuildMethodFor(_)withObjCon(_)inside(_)
}; // end of method open$build(_,_,_)
this.methods["open$build(3)"] = func2;
func2.methodName = "open$build(3)";
func2.paramCounts = [0];
func2.paramNames = [];
func2.definitionLine = 19;
func2.definitionModule = "minitestBundle";
setLineNumber(5); // compilenode string
var string93 = new GraceString("nullSuite");
var call92 = selfRequest(var_$dialect, "singleton(1)", [1], string93);
var var_nullSuite = call92;
var reader94_nullSuite = function() { // reader method nullSuite
if (var_nullSuite === undefined) raiseUninitializedVariable("nullSuite");
return var_nullSuite;
};
reader94_nullSuite.isDef = true;
reader94_nullSuite.confidential = true;
this.methods["nullSuite"] = reader94_nullSuite;
setLineNumber(6); // compilenode string
var string96 = new GraceString("nullBlock");
var call95 = selfRequest(var_$dialect, "singleton(1)", [1], string96);
var var_nullBlock = call95;
var reader97_nullBlock = function() { // reader method nullBlock
if (var_nullBlock === undefined) raiseUninitializedVariable("nullBlock");
return var_nullBlock;
};
reader97_nullBlock.isDef = true;
reader97_nullBlock.confidential = true;
this.methods["nullBlock"] = reader97_nullBlock;
setLineNumber(8); // compilenode vardec
if (var_nullSuite === undefined) raiseUninitializedVariable("nullSuite");
var var_currentTestSuiteForDialect = var_nullSuite;
var reader98_currentTestSuiteForDialect = function() { // reader method currentTestSuiteForDialect
if (var_currentTestSuiteForDialect === undefined) raiseUninitializedVariable("currentTestSuiteForDialect");
return var_currentTestSuiteForDialect;
};
reader98_currentTestSuiteForDialect.isVar = true;
reader98_currentTestSuiteForDialect.confidential = true;
this.methods["currentTestSuiteForDialect"] = reader98_currentTestSuiteForDialect;
var writer99_currentTestSuiteForDialect = function(argcv, n) { // writer method currentTestSuiteForDialect:=(_)
var_currentTestSuiteForDialect = n;
return GraceDone;
};
writer99_currentTestSuiteForDialect.confidential = true;
this.methods["currentTestSuiteForDialect:=(1)"] = writer99_currentTestSuiteForDialect;
setLineNumber(9); // compilenode vardec
if (var_nullBlock === undefined) raiseUninitializedVariable("nullBlock");
var var_currentSetupBlockForTesting = var_nullBlock;
var reader100_currentSetupBlockForTesting = function() { // reader method currentSetupBlockForTesting
if (var_currentSetupBlockForTesting === undefined) raiseUninitializedVariable("currentSetupBlockForTesting");
return var_currentSetupBlockForTesting;
};
reader100_currentSetupBlockForTesting.isVar = true;
reader100_currentSetupBlockForTesting.confidential = true;
this.methods["currentSetupBlockForTesting"] = reader100_currentSetupBlockForTesting;
var writer101_currentSetupBlockForTesting = function(argcv, n) { // writer method currentSetupBlockForTesting:=(_)
var_currentSetupBlockForTesting = n;
return GraceDone;
};
writer101_currentSetupBlockForTesting.confidential = true;
this.methods["currentSetupBlockForTesting:=(1)"] = writer101_currentSetupBlockForTesting;
setLineNumber(10); // compilenode num
var var_currentTestBlockForTesting = new GraceNum(0);
var reader102_currentTestBlockForTesting = function() { // reader method currentTestBlockForTesting
if (var_currentTestBlockForTesting === undefined) raiseUninitializedVariable("currentTestBlockForTesting");
return var_currentTestBlockForTesting;
};
reader102_currentTestBlockForTesting.isVar = true;
reader102_currentTestBlockForTesting.confidential = true;
this.methods["currentTestBlockForTesting"] = reader102_currentTestBlockForTesting;
var writer103_currentTestBlockForTesting = function(argcv, n) { // writer method currentTestBlockForTesting:=(_)
var_currentTestBlockForTesting = n;
return GraceDone;
};
writer103_currentTestBlockForTesting.confidential = true;
this.methods["currentTestBlockForTesting:=(1)"] = writer103_currentTestBlockForTesting;
setLineNumber(11); // compilenode num
var var_currentTestInThisEvaluation = new GraceNum(0);
var reader104_currentTestInThisEvaluation = function() { // reader method currentTestInThisEvaluation
if (var_currentTestInThisEvaluation === undefined) raiseUninitializedVariable("currentTestInThisEvaluation");
return var_currentTestInThisEvaluation;
};
reader104_currentTestInThisEvaluation.isVar = true;
reader104_currentTestInThisEvaluation.confidential = true;
this.methods["currentTestInThisEvaluation"] = reader104_currentTestInThisEvaluation;
var writer105_currentTestInThisEvaluation = function(argcv, n) { // writer method currentTestInThisEvaluation:=(_)
var_currentTestInThisEvaluation = n;
return GraceDone;
};
writer105_currentTestInThisEvaluation.confidential = true;
this.methods["currentTestInThisEvaluation:=(1)"] = writer105_currentTestInThisEvaluation;
setLineNumber(12); // compilenode member
var var_errorsToBeRerun = GraceTrue;
var reader107_errorsToBeRerun = function() { // reader method errorsToBeRerun
if (var_errorsToBeRerun === undefined) raiseUninitializedVariable("errorsToBeRerun");
return var_errorsToBeRerun;
};
reader107_errorsToBeRerun.isVar = true;
reader107_errorsToBeRerun.confidential = true;
this.methods["errorsToBeRerun"] = reader107_errorsToBeRerun;
var writer108_errorsToBeRerun = function(argcv, n) { // writer method errorsToBeRerun:=(_)
var_errorsToBeRerun = n;
return GraceDone;
};
writer108_errorsToBeRerun.confidential = true;
this.methods["errorsToBeRerun:=(1)"] = writer108_errorsToBeRerun;
setLineNumber(13); // compilenode object
var obj109_build = function(ignore, outerObj, aliases, exclusions) {
this.closureKeys = this.closureKeys || [];
this.closureKeys.push("outer_minitestBundle_13");
this.outer_minitestBundle_13 = outerObj;
const inheritedExclusions = { };
for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) {
const exMeth = exclusions[eix];
inheritedExclusions[exMeth] = this.methods[exMeth]; };
var func110 = function(argcv) { // method countOneAssertion, line 14
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 0) && (numArgs !== 0)) {
raiseTypeArgError("countOneAssertion", 0, numArgs - 0);
}
setLineNumber(15); // compilenode string
var string112 = new GraceString("countOneAssertion requested on dummy result");
Grace_print(string112);
return GraceDone;
}; // end of method countOneAssertion
this.methods["countOneAssertion"] = func110;
func110.methodName = "countOneAssertion";
func110.paramCounts = [0];
func110.paramNames = [];
func110.definitionLine = 14;
func110.definitionModule = "minitestBundle";
const overridenByAliases = { };
for (let aix = 0, aLen = aliases.length; aix < aLen; aix ++) {
const a = aliases[aix];
const newNm = a.newName;
const oldNm = a.oldName;
overridenByAliases[newNm] = this.methods[newNm];
const m = confidentialVersion(overridenByAliases[oldNm] || this.methods[oldNm], newNm);
m.definitionLine = 13;
m.definitionModule = "minitestBundle";
this.methods[newNm] = m;
}
for (let exName in inheritedExclusions) {
if (inheritedExclusions.hasOwnProperty(exName)) {
if (inheritedExclusions[exName]) {
this.methods[exName] = inheritedExclusions[exName];
} else {
delete this.methods[exName];
}
}
}
var obj109_init = function() { // init of object on line 13
};
return obj109_init; // from compileBuildAndInitFunctions(_)inMethod(_)
};
var obj109 = emptyGraceObject("object", "minitestBundle", 13);
var obj109_init = obj109_build.call(obj109, null, this, [], []);
obj109_init.call(obj109); // end of compileobject
var var_currentResult = obj109;
var reader113_currentResult = function() { // reader method currentResult
if (var_currentResult === undefined) raiseUninitializedVariable("currentResult");
return var_currentResult;
};
reader113_currentResult.isVar = true;
reader113_currentResult.confidential = true;
this.methods["currentResult"] = reader113_currentResult;
var writer114_currentResult = function(argcv, n) { // writer method currentResult:=(_)
var_currentResult = n;
return GraceDone;
};
writer114_currentResult.confidential = true;
this.methods["currentResult:=(1)"] = writer114_currentResult;
return this;
}
if (typeof global !== "undefined")
global.gracecode_minitestBundle = gracecode_minitestBundle;
if (typeof window !== "undefined")
window.gracecode_minitestBundle = gracecode_minitestBundle;
gracecode_minitestBundle.definitionModule = "minitestBundle";
gracecode_minitestBundle.sourceFile = gracecode_minitestBundle_sourceFile;
gracecode_minitestBundle.sha256 = gracecode_minitestBundle_sha256;
gracecode_minitestBundle.minigraceRevision = gracecode_minitestBundle_minigraceRevision;
gracecode_minitestBundle.minigraceGeneration = gracecode_minitestBundle_minigraceGeneration;
gracecode_minitestBundle.imports = [ ["standard", "5016aa3a5b2e0d35a67289d21c1e41cf8d73bef931ceea7b35f6a8b10a1386cf"],
["gUnit", "40e0131e9bd63eeefedebf1c32db4d84dc63b0ed7ce2b17c03da8aa7932c2eea"] ];
gracecode_minitestBundle.definitionLine = 1;