Browse Source

smalltalk at: => Smalltalk current at:

Herbert Vojčík 11 years ago
parent
commit
4b26274200
2 changed files with 6 additions and 5 deletions
  1. 5 4
      js/Compiler-Tests.js
  2. 1 1
      st/Compiler-Tests.st

+ 5 - 4
js/Compiler-Tests.js

@@ -785,15 +785,16 @@ selector: "testPascalCaseGlobal",
 protocol: 'tests',
 fn: function (){
 var self=this;
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo ^Object",_st(smalltalk)._at_("Object"));
+self._should_return_("foo ^Object",_st(_st($Smalltalk())._current())._at_("Object"));
 $ctx1.sendIdx["should:return:"]=1;
 self._should_return_("foo ^NonExistent",nil);
 return self}, function($ctx1) {$ctx1.fill(self,"testPascalCaseGlobal",{},smalltalk.CodeGeneratorTest)})},
 args: [],
-source: "testPascalCaseGlobal\x0a\x09self should: 'foo ^Object' return: (smalltalk at: 'Object').\x0a\x09self should: 'foo ^NonExistent' return: nil",
-messageSends: ["should:return:", "at:"],
-referencedClasses: []
+source: "testPascalCaseGlobal\x0a\x09self should: 'foo ^Object' return: (Smalltalk current at: 'Object').\x0a\x09self should: 'foo ^NonExistent' return: nil",
+messageSends: ["should:return:", "at:", "current"],
+referencedClasses: ["Smalltalk"]
 }),
 smalltalk.CodeGeneratorTest);
 

+ 1 - 1
st/Compiler-Tests.st

@@ -309,7 +309,7 @@ testNonLocalReturn
 !
 
 testPascalCaseGlobal
-	self should: 'foo ^Object' return: (smalltalk at: 'Object').
+	self should: 'foo ^Object' return: (Smalltalk current at: 'Object').
 	self should: 'foo ^NonExistent' return: nil
 !