|
@@ -2903,6 +2903,48 @@ catch(e) {if(e===$early)return e[0]; throw e}
|
|
|
}; }),
|
|
|
$globals.ClassTest);
|
|
|
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "testRespondsTo",
|
|
|
+protocol: "tests",
|
|
|
+
|
|
|
+args: [],
|
|
|
+source: "testRespondsTo\x0a\x09self assert: (Object new respondsTo: #class).\x0a\x09self deny: (Object new respondsTo: #foo).\x0a\x09self assert: (Object respondsTo: #new)",
|
|
|
+referencedClasses: ["Object"],
|
|
|
+
|
|
|
+pragmas: [],
|
|
|
+messageSends: ["assert:", "respondsTo:", "new", "deny:"]
|
|
|
+}, function ($methodClass){ return function (){
|
|
|
+var self=this,$self=this;
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+[$self._assert_([$recv([$recv($globals.Object)._new()
|
|
|
+
|
|
|
+,$ctx1.sendIdx["new"]=1
|
|
|
+
|
|
|
+][0])._respondsTo_("class")
|
|
|
+
|
|
|
+,$ctx1.sendIdx["respondsTo:"]=1
|
|
|
+
|
|
|
+][0])
|
|
|
+
|
|
|
+,$ctx1.sendIdx["assert:"]=1
|
|
|
+
|
|
|
+][0];
|
|
|
+$self._deny_([$recv($recv($globals.Object)._new())._respondsTo_("foo")
|
|
|
+
|
|
|
+,$ctx1.sendIdx["respondsTo:"]=2
|
|
|
+
|
|
|
+][0]);
|
|
|
+$self._assert_($recv($globals.Object)._respondsTo_("new"));
|
|
|
+return self;
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"testRespondsTo",{})});
|
|
|
+
|
|
|
+}; }),
|
|
|
+$globals.ClassTest);
|
|
|
+
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
selector: "testSetJavaScriptConstructor",
|