|
@@ -6087,6 +6087,43 @@ referencedClasses: ["MessageNotUnderstood"]
|
|
|
}),
|
|
|
globals.JSObjectProxyTest);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "testDNURegression1057",
|
|
|
+protocol: 'tests',
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+var jsObject;
|
|
|
+function $Error(){return globals.Error||(typeof Error=="undefined"?nil:Error)}
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1;
|
|
|
+jsObject=[];
|
|
|
+_st(jsObject)._basicAt_put_("allowJavaScriptCalls",true);
|
|
|
+$ctx1.sendIdx["basicAt:put:"]=1;
|
|
|
+_st(jsObject)._basicAt_put_("foo",(3));
|
|
|
+self._shouldnt_raise_((function(){
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+return _st(jsObject)._foo();
|
|
|
+$ctx2.sendIdx["foo"]=1;
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),$Error());
|
|
|
+$ctx1.sendIdx["shouldnt:raise:"]=1;
|
|
|
+$1=_st(jsObject)._foo();
|
|
|
+$ctx1.sendIdx["foo"]=2;
|
|
|
+self._assert_equals_($1,(3));
|
|
|
+$ctx1.sendIdx["assert:equals:"]=1;
|
|
|
+self._shouldnt_raise_((function(){
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+return _st(jsObject)._foo_((4));
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}),$Error());
|
|
|
+self._assert_equals_(_st(jsObject)._foo(),(4));
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"testDNURegression1057",{jsObject:jsObject},globals.JSObjectProxyTest)})},
|
|
|
+args: [],
|
|
|
+source: "testDNURegression1057\x0a\x09| jsObject |\x0a\x09jsObject := #().\x0a\x09jsObject basicAt: 'allowJavaScriptCalls' put: true.\x0a\x09jsObject basicAt: 'foo' put: 3.\x0a\x09self shouldnt: [ jsObject foo ] raise: Error.\x0a\x09self assert: jsObject foo equals: 3.\x0a\x09self shouldnt: [ jsObject foo: 4 ] raise: Error.\x0a\x09self assert: jsObject foo equals: 4",
|
|
|
+messageSends: ["basicAt:put:", "shouldnt:raise:", "foo", "assert:equals:", "foo:"],
|
|
|
+referencedClasses: ["Error"]
|
|
|
+}),
|
|
|
+globals.JSObjectProxyTest);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "testMessageSend",
|