Browse Source

Fixed issue #232

Nicolas Petton 11 years ago
parent
commit
3a0bfd539a
3 changed files with 9 additions and 5 deletions
  1. 2 1
      js/IDE.deploy.js
  2. 4 3
      js/IDE.js
  3. 3 1
      st/IDE.st

+ 2 - 1
js/IDE.deploy.js

@@ -3901,7 +3901,8 @@ smalltalk.method({
 selector: "performFailure:",
 fn: function (aTestCase) {
     var self = this;
-    smalltalk.send(aTestCase, "_perform_", [smalltalk.send(aTestCase, "_selector", [])]);
+    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;
 }
 }),

+ 4 - 3
js/IDE.js

@@ -5127,12 +5127,13 @@ selector: "performFailure:",
 category: 'actions',
 fn: function (aTestCase) {
     var self = this;
-    smalltalk.send(aTestCase, "_perform_", [smalltalk.send(aTestCase, "_selector", [])]);
+    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;
 },
 args: ["aTestCase"],
-source: "performFailure: aTestCase\x0a\x09aTestCase perform: aTestCase selector",
-messageSends: ["perform:", "selector"],
+source: "performFailure: aTestCase\x0a\x09aTestCase setUp.\x0a    [ aTestCase perform: aTestCase selector ]\x0a  \x09\x09ensure: [ aTestCase tearDown ]",
+messageSends: ["setUp", "ensure:", "tearDown", "perform:", "selector"],
 referencedClasses: []
 }),
 smalltalk.TestRunner);

+ 3 - 1
st/IDE.st

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