|
@@ -402,30 +402,6 @@ return self;
|
|
|
}; }),
|
|
|
$globals.TestCase);
|
|
|
|
|
|
-$core.addMethod(
|
|
|
-$core.method({
|
|
|
-selector: "debugCase",
|
|
|
-protocol: "running",
|
|
|
-
|
|
|
-args: [],
|
|
|
-source: "debugCase\x0a\x09\x22Runs a test case in isolated context, debugging all errors.\x22\x0a\x0a\x09(DebugTestContext testCase: self) start",
|
|
|
-referencedClasses: ["DebugTestContext"],
|
|
|
-
|
|
|
-pragmas: [],
|
|
|
-messageSends: ["start", "testCase:"]
|
|
|
-}, function ($methodClass){ return function (){
|
|
|
-var self=this,$self=this;
|
|
|
-
|
|
|
-return $core.withContext(function($ctx1) {
|
|
|
-
|
|
|
-$recv($recv($globals.DebugTestContext)._testCase_(self))._start();
|
|
|
-return self;
|
|
|
-
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"debugCase",{})});
|
|
|
-
|
|
|
-}; }),
|
|
|
-$globals.TestCase);
|
|
|
-
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
selector: "deny:",
|
|
@@ -1186,85 +1162,6 @@ return $recv($1)._yourself();
|
|
|
$globals.TestContext.a$cls);
|
|
|
|
|
|
|
|
|
-$core.addClass("DebugTestContext", $globals.TestContext, "SUnit");
|
|
|
-$core.setSlots($globals.DebugTestContext, ["finished", "result"]);
|
|
|
-
|
|
|
-$globals.DebugTestContext.comment="I add error debugging to `TestContext`.\x0a\x0aErrors are caught and explicitly passed to `ErrorHandler`.\x0aI am used in `TestCase >> debugCase`.";
|
|
|
-
|
|
|
-$core.addMethod(
|
|
|
-$core.method({
|
|
|
-selector: "execute:",
|
|
|
-protocol: "running",
|
|
|
-
|
|
|
-args: ["aBlock"],
|
|
|
-source: "execute: aBlock\x0a\x09self withErrorDebugging: [ super execute: aBlock ]",
|
|
|
-referencedClasses: [],
|
|
|
-
|
|
|
-pragmas: [],
|
|
|
-messageSends: ["withErrorDebugging:", "execute:"]
|
|
|
-}, function ($methodClass){ return function (aBlock){
|
|
|
-var self=this,$self=this;
|
|
|
-
|
|
|
-return $core.withContext(function($ctx1) {
|
|
|
-
|
|
|
-$self._withErrorDebugging_((function(){
|
|
|
-
|
|
|
-return $core.withContext(function($ctx2) {
|
|
|
-
|
|
|
-return [(
|
|
|
-
|
|
|
-$ctx2.supercall = true,
|
|
|
-
|
|
|
-($methodClass.superclass||$boot.nilAsClass).fn.prototype._execute_.call($self,aBlock))
|
|
|
-
|
|
|
-,$ctx2.supercall = false
|
|
|
-
|
|
|
-][0];
|
|
|
-
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
|
-
|
|
|
-}));
|
|
|
-return self;
|
|
|
-
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"execute:",{aBlock:aBlock})});
|
|
|
-
|
|
|
-}; }),
|
|
|
-$globals.DebugTestContext);
|
|
|
-
|
|
|
-$core.addMethod(
|
|
|
-$core.method({
|
|
|
-selector: "withErrorDebugging:",
|
|
|
-protocol: "private",
|
|
|
-
|
|
|
-args: ["aBlock"],
|
|
|
-source: "withErrorDebugging: aBlock\x0a\x09aBlock\x0a\x09\x09on: Error\x0a\x09\x09do: [ :ex | ErrorHandler handleError: ex ]",
|
|
|
-referencedClasses: ["Error", "ErrorHandler"],
|
|
|
-
|
|
|
-pragmas: [],
|
|
|
-messageSends: ["on:do:", "handleError:"]
|
|
|
-}, function ($methodClass){ return function (aBlock){
|
|
|
-var self=this,$self=this;
|
|
|
-
|
|
|
-return $core.withContext(function($ctx1) {
|
|
|
-
|
|
|
-$recv(aBlock)._on_do_($globals.Error,(function(ex){
|
|
|
-
|
|
|
-return $core.withContext(function($ctx2) {
|
|
|
-
|
|
|
-return $recv($globals.ErrorHandler)._handleError_(ex);
|
|
|
-
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,1)});
|
|
|
-
|
|
|
-}));
|
|
|
-return self;
|
|
|
-
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"withErrorDebugging:",{aBlock:aBlock})});
|
|
|
-
|
|
|
-}; }),
|
|
|
-$globals.DebugTestContext);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
$core.addClass("ReportingTestContext", $globals.TestContext, "SUnit");
|
|
|
$core.setSlots($globals.ReportingTestContext, ["finished", "result"]);
|
|
|
|