Browse Source

Uncommenting other method inheritance tests.

Herbert Vojčík 11 years ago
parent
commit
19ffb5af09
3 changed files with 44 additions and 12 deletions
  1. 19 2
      js/Kernel-Tests.deploy.js
  2. 21 4
      js/Kernel-Tests.js
  3. 4 6
      st/Kernel-Tests.st

+ 19 - 2
js/Kernel-Tests.deploy.js

@@ -2601,8 +2601,17 @@ selector: "testMNU11",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+self["@performBlock"]=(function(x){
+return smalltalk.withContext(function($ctx2) {
+return _st(x)._foo();
+}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})});
+self._shouldMNU();
+self._installTop_("foo ^ false");
+self._installTop_("foo ^ true");
+self._deinstallTop();
+self._shouldMNU();
 return self}, function($ctx1) {$ctx1.fill(self,"testMNU11",{},smalltalk.MethodInheritanceTest)})},
-messageSends: []}),
+messageSends: ["foo", "shouldMNU", "installTop:", "deinstallTop"]}),
 smalltalk.MethodInheritanceTest);
 
 smalltalk.addMethod(
@@ -2630,8 +2639,16 @@ selector: "testReturns1",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+self["@performBlock"]=(function(x){
+return smalltalk.withContext(function($ctx2) {
+return _st(x)._foo();
+}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})});
+self._installTop_("foo ^ false");
+self._shouldReturn_(false);
+self._installTop_("foo ^ true");
+self._shouldReturn_(true);
 return self}, function($ctx1) {$ctx1.fill(self,"testReturns1",{},smalltalk.MethodInheritanceTest)})},
-messageSends: []}),
+messageSends: ["foo", "installTop:", "shouldReturn:"]}),
 smalltalk.MethodInheritanceTest);
 
 

+ 21 - 4
js/Kernel-Tests.js

@@ -3292,10 +3292,19 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+self["@performBlock"]=(function(x){
+return smalltalk.withContext(function($ctx2) {
+return _st(x)._foo();
+}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})});
+self._shouldMNU();
+self._installTop_("foo ^ false");
+self._installTop_("foo ^ true");
+self._deinstallTop();
+self._shouldMNU();
 return self}, function($ctx1) {$ctx1.fill(self,"testMNU11",{},smalltalk.MethodInheritanceTest)})},
 args: [],
-source: "testMNU11\x0a\x09\x22Breaks other tests. Commenting out\x22\x0a\x09\x22performBlock := [ :x | x foo ].\x0a\x09self shouldMNU.\x0a\x09self installTop: 'foo ^ false'.\x0a\x09self installTop: 'foo ^ true'.\x0a\x09self deinstallTop.\x0a\x09self shouldMNU\x22",
-messageSends: [],
+source: "testMNU11\x0a\x09performBlock := [ :x | x foo ].\x0a\x09self shouldMNU.\x0a\x09self installTop: 'foo ^ false'.\x0a\x09self installTop: 'foo ^ true'.\x0a\x09self deinstallTop.\x0a\x09self shouldMNU",
+messageSends: ["foo", "shouldMNU", "installTop:", "deinstallTop"],
 referencedClasses: []
 }),
 smalltalk.MethodInheritanceTest);
@@ -3331,10 +3340,18 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+self["@performBlock"]=(function(x){
+return smalltalk.withContext(function($ctx2) {
+return _st(x)._foo();
+}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})});
+self._installTop_("foo ^ false");
+self._shouldReturn_(false);
+self._installTop_("foo ^ true");
+self._shouldReturn_(true);
 return self}, function($ctx1) {$ctx1.fill(self,"testReturns1",{},smalltalk.MethodInheritanceTest)})},
 args: [],
-source: "testReturns1\x0a\x09\x22Breaks other tests. Commenting out\x22\x0a\x09\x22performBlock := [ :x | x foo ].\x0a\x09self installTop: 'foo ^ false'.\x0a\x09self shouldReturn: false.\x0a\x09self installTop: 'foo ^ true'.\x0a\x09self shouldReturn: true\x22",
-messageSends: [],
+source: "testReturns1\x0a\x09performBlock := [ :x | x foo ].\x0a\x09self installTop: 'foo ^ false'.\x0a\x09self shouldReturn: false.\x0a\x09self installTop: 'foo ^ true'.\x0a\x09self shouldReturn: true",
+messageSends: ["foo", "installTop:", "shouldReturn:"],
 referencedClasses: []
 }),
 smalltalk.MethodInheritanceTest);

+ 4 - 6
st/Kernel-Tests.st

@@ -1222,13 +1222,12 @@ shouldReturn: anObject and: anObject2 and: anObject3
 !MethodInheritanceTest methodsFor: 'tests'!
 
 testMNU11
-	"Breaks other tests. Commenting out"
-	"performBlock := [ :x | x foo ].
+	performBlock := [ :x | x foo ].
 	self shouldMNU.
 	self installTop: 'foo ^ false'.
 	self installTop: 'foo ^ true'.
 	self deinstallTop.
-	self shouldMNU"
+	self shouldMNU
 !
 
 testMNU22
@@ -1241,12 +1240,11 @@ testMNU22
 !
 
 testReturns1
-	"Breaks other tests. Commenting out"
-	"performBlock := [ :x | x foo ].
+	performBlock := [ :x | x foo ].
 	self installTop: 'foo ^ false'.
 	self shouldReturn: false.
 	self installTop: 'foo ^ true'.
-	self shouldReturn: true"
+	self shouldReturn: true
 ! !
 
 TestCase subclass: #NumberTest