Browse Source

Simplified TestRunner >> performFailure:

Herby Vojčík 12 years ago
parent
commit
1513117bed
3 changed files with 11 additions and 17 deletions
  1. 4 6
      js/IDE.deploy.js
  2. 6 8
      js/IDE.js
  3. 1 3
      st/IDE.st

+ 4 - 6
js/IDE.deploy.js

@@ -4009,12 +4009,10 @@ smalltalk.addMethod(
 "_performFailure_",
 smalltalk.method({
 selector: "performFailure:",
-fn: function (aTestCase) {
-    var self = this;
-    smalltalk.send(aTestCase, "_setUp", []);
-    smalltalk.send(function () {return smalltalk.send(aTestCase, "_perform_", [smalltalk.send(aTestCase, "_selector", [])]);}, "_ensure_", [function () {return smalltalk.send(aTestCase, "_tearDown", []);}]);
-    return self;
-}
+fn: function (aTestCase){
+var self=this;
+smalltalk.send(aTestCase,"_runCase",[]);
+return self}
 }),
 smalltalk.TestRunner);
 

+ 6 - 8
js/IDE.js

@@ -5240,15 +5240,13 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "performFailure:",
 category: 'actions',
-fn: function (aTestCase) {
-    var self = this;
-    smalltalk.send(aTestCase, "_setUp", []);
-    smalltalk.send(function () {return smalltalk.send(aTestCase, "_perform_", [smalltalk.send(aTestCase, "_selector", [])]);}, "_ensure_", [function () {return smalltalk.send(aTestCase, "_tearDown", []);}]);
-    return self;
-},
+fn: function (aTestCase){
+var self=this;
+smalltalk.send(aTestCase,"_runCase",[]);
+return self},
 args: ["aTestCase"],
-source: "performFailure: aTestCase\x0a\x09aTestCase setUp.\x0a    [ aTestCase perform: aTestCase selector ]\x0a  \x09\x09ensure: [ aTestCase tearDown ]",
-messageSends: ["setUp", "ensure:", "tearDown", "perform:", "selector"],
+source: "performFailure: aTestCase\x0a\x09aTestCase runCase",
+messageSends: ["runCase"],
 referencedClasses: []
 }),
 smalltalk.TestRunner);

+ 1 - 3
st/IDE.st

@@ -2053,9 +2053,7 @@ testCases
 !TestRunner methodsFor: 'actions'!
 
 performFailure: aTestCase
-	aTestCase setUp.
-    [ aTestCase perform: aTestCase selector ]
-  		ensure: [ aTestCase tearDown ]
+	aTestCase runCase
 !
 
 run: aCollection