2
0
Pārlūkot izejas kodu

Oops. Broke some tests.

Nicolas Petton 11 gadi atpakaļ
vecāks
revīzija
d9ce50f9da
3 mainītis faili ar 36 papildinājumiem un 36 dzēšanām
  1. 13 13
      js/SUnit-Tests.deploy.js
  2. 16 16
      js/SUnit-Tests.js
  3. 7 7
      st/SUnit-Tests.st

+ 13 - 13
js/SUnit-Tests.deploy.js

@@ -144,28 +144,31 @@ return self}
 smalltalk.SUnitAsyncTest);
 
 smalltalk.addMethod(
-"_fakeTimeout",
+"_fakeMultipleTimeoutFailing",
 smalltalk.method({
-selector: "fakeTimeout",
+selector: "fakeMultipleTimeoutFailing",
 fn: function (){
 var self=this;
-smalltalk.send(self,"_timeout_",[(4)]);
+smalltalk.send(self,"_timeout_",[(100)]);
 smalltalk.send(smalltalk.send(self,"_async_",[(function(){
+smalltalk.send(self,"_timeout_",[(5)]);
+return smalltalk.send(smalltalk.send(self,"_async_",[(function(){
 return smalltalk.send(self,"_finished",[]);
+})]),"_valueWithTimeout_",[(10)]);
 })]),"_valueWithTimeout_",[(5)]);
 return self}
 }),
 smalltalk.SUnitAsyncTest);
 
 smalltalk.addMethod(
-"_fakeTimeoutFailing",
+"_fakeMultipleTimeoutPassing",
 smalltalk.method({
-selector: "fakeTimeoutFailing",
+selector: "fakeMultipleTimeoutPassing",
 fn: function (){
 var self=this;
-smalltalk.send(self,"_timeout_",[(100)]);
+smalltalk.send(self,"_timeout_",[(10)]);
 smalltalk.send(smalltalk.send(self,"_async_",[(function(){
-smalltalk.send(self,"_timeout_",[(5)]);
+smalltalk.send(self,"_timeout_",[(20)]);
 return smalltalk.send(smalltalk.send(self,"_async_",[(function(){
 return smalltalk.send(self,"_finished",[]);
 })]),"_valueWithTimeout_",[(10)]);
@@ -175,17 +178,14 @@ return self}
 smalltalk.SUnitAsyncTest);
 
 smalltalk.addMethod(
-"_fakeTimeoutPassing",
+"_fakeTimeout",
 smalltalk.method({
-selector: "fakeTimeoutPassing",
+selector: "fakeTimeout",
 fn: function (){
 var self=this;
-smalltalk.send(self,"_timeout_",[(10)]);
+smalltalk.send(self,"_timeout_",[(4)]);
 smalltalk.send(smalltalk.send(self,"_async_",[(function(){
-smalltalk.send(self,"_timeout_",[(20)]);
-return smalltalk.send(smalltalk.send(self,"_async_",[(function(){
 return smalltalk.send(self,"_finished",[]);
-})]),"_valueWithTimeout_",[(10)]);
 })]),"_valueWithTimeout_",[(5)]);
 return self}
 }),

+ 16 - 16
js/SUnit-Tests.js

@@ -195,63 +195,63 @@ referencedClasses: []
 smalltalk.SUnitAsyncTest);
 
 smalltalk.addMethod(
-"_fakeTimeout",
+"_fakeMultipleTimeoutFailing",
 smalltalk.method({
-selector: "fakeTimeout",
+selector: "fakeMultipleTimeoutFailing",
 category: 'helpers',
 fn: function (){
 var self=this;
-smalltalk.send(self,"_timeout_",[(4)]);
+smalltalk.send(self,"_timeout_",[(100)]);
 smalltalk.send(smalltalk.send(self,"_async_",[(function(){
+smalltalk.send(self,"_timeout_",[(5)]);
+return smalltalk.send(smalltalk.send(self,"_async_",[(function(){
 return smalltalk.send(self,"_finished",[]);
+})]),"_valueWithTimeout_",[(10)]);
 })]),"_valueWithTimeout_",[(5)]);
 return self},
 args: [],
-source: "fakeTimeout\x0a\x09self timeout: 4.\x0a    (self async: [ self finished ]) valueWithTimeout: 5\x0a",
+source: "fakeMultipleTimeoutFailing\x0a\x09self timeout: 100.\x0a    (self async: [\x0a\x09\x09self timeout: 5.\x0a        (self async: [ self finished ]) valueWithTimeout: 10\x0a\x09]) valueWithTimeout: 5\x0a",
 messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished"],
 referencedClasses: []
 }),
 smalltalk.SUnitAsyncTest);
 
 smalltalk.addMethod(
-"_fakeTimeoutFailing",
+"_fakeMultipleTimeoutPassing",
 smalltalk.method({
-selector: "fakeTimeoutFailing",
+selector: "fakeMultipleTimeoutPassing",
 category: 'helpers',
 fn: function (){
 var self=this;
-smalltalk.send(self,"_timeout_",[(100)]);
+smalltalk.send(self,"_timeout_",[(10)]);
 smalltalk.send(smalltalk.send(self,"_async_",[(function(){
-smalltalk.send(self,"_timeout_",[(5)]);
+smalltalk.send(self,"_timeout_",[(20)]);
 return smalltalk.send(smalltalk.send(self,"_async_",[(function(){
 return smalltalk.send(self,"_finished",[]);
 })]),"_valueWithTimeout_",[(10)]);
 })]),"_valueWithTimeout_",[(5)]);
 return self},
 args: [],
-source: "fakeTimeoutFailing\x0a\x09self timeout: 100.\x0a    (self async: [\x0a\x09\x09self timeout: 5.\x0a        (self async: [ self finished ]) valueWithTimeout: 10\x0a\x09]) valueWithTimeout: 5\x0a",
+source: "fakeMultipleTimeoutPassing\x0a\x09self timeout: 10.\x0a    (self async: [\x0a\x09\x09self timeout: 20.\x0a        (self async: [ self finished ]) valueWithTimeout: 10\x0a\x09]) valueWithTimeout: 5\x0a",
 messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished"],
 referencedClasses: []
 }),
 smalltalk.SUnitAsyncTest);
 
 smalltalk.addMethod(
-"_fakeTimeoutPassing",
+"_fakeTimeout",
 smalltalk.method({
-selector: "fakeTimeoutPassing",
+selector: "fakeTimeout",
 category: 'helpers',
 fn: function (){
 var self=this;
-smalltalk.send(self,"_timeout_",[(10)]);
+smalltalk.send(self,"_timeout_",[(4)]);
 smalltalk.send(smalltalk.send(self,"_async_",[(function(){
-smalltalk.send(self,"_timeout_",[(20)]);
-return smalltalk.send(smalltalk.send(self,"_async_",[(function(){
 return smalltalk.send(self,"_finished",[]);
-})]),"_valueWithTimeout_",[(10)]);
 })]),"_valueWithTimeout_",[(5)]);
 return self},
 args: [],
-source: "fakeTimeoutPassing\x0a\x09self timeout: 10.\x0a    (self async: [\x0a\x09\x09self timeout: 20.\x0a        (self async: [ self finished ]) valueWithTimeout: 10\x0a\x09]) valueWithTimeout: 5\x0a",
+source: "fakeTimeout\x0a\x09self timeout: 4.\x0a    (self async: [ self finished ]) valueWithTimeout: 5\x0a",
 messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished"],
 referencedClasses: []
 }),

+ 7 - 7
st/SUnit-Tests.st

@@ -77,12 +77,7 @@ fakeFailure
     flag := (self async: [ flag := 'ok'. self assert: false ]) valueWithTimeout: 5
 !
 
-fakeTimeout
-	self timeout: 4.
-    (self async: [ self finished ]) valueWithTimeout: 5
-!
-
-fakeTimeoutFailing
+fakeMultipleTimeoutFailing
 	self timeout: 100.
     (self async: [
 		self timeout: 5.
@@ -90,12 +85,17 @@ fakeTimeoutFailing
 	]) valueWithTimeout: 5
 !
 
-fakeTimeoutPassing
+fakeMultipleTimeoutPassing
 	self timeout: 10.
     (self async: [
 		self timeout: 20.
         (self async: [ self finished ]) valueWithTimeout: 10
 	]) valueWithTimeout: 5
+!
+
+fakeTimeout
+	self timeout: 4.
+    (self async: [ self finished ]) valueWithTimeout: 5
 ! !
 
 !SUnitAsyncTest methodsFor: 'private'!