|
@@ -182,19 +182,20 @@ fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
|
|
|
-function theTestPrototype() {
|
|
|
|
- this.name = "theTestPrototype";
|
|
|
|
-}
|
|
|
|
|
|
+function theTestPrototype() {this.name = "theTestPrototype";}
|
|
function theTestConstructor(arg1, arg2, arg3) {}
|
|
function theTestConstructor(arg1, arg2, arg3) {}
|
|
theTestConstructor.prototype = new theTestPrototype;
|
|
theTestConstructor.prototype = new theTestPrototype;
|
|
|
|
|
|
var theWrappedConstructor = _st(theTestConstructor);
|
|
var theWrappedConstructor = _st(theTestConstructor);
|
|
var theResult = theWrappedConstructor._newWithValues_([1, 2, 3]);
|
|
var theResult = theWrappedConstructor._newWithValues_([1, 2, 3]);
|
|
|
|
+self._assert_equals_(Object.getPrototypeOf(theResult).name, 'theTestPrototype');
|
|
|
|
|
|
-self._assert_equals_(Object.getPrototypeOf(theResult).name, 'theTestPrototype');;
|
|
|
|
|
|
+"newWithValues: cannot help if the argument list is wrong, and should warn that a mistake was made."
|
|
|
|
+function constructionShouldFail() {var anotherResult = theWrappedConstructor._newWithValues_('This is so wrong');}
|
|
|
|
+self._should_raise_(_st(constructionShouldFail), smalltalk.Error);;
|
|
return self}, function($ctx1) {$ctx1.fill(self,"testNewWithValues",{},smalltalk.BlockClosureTest)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"testNewWithValues",{},smalltalk.BlockClosureTest)})},
|
|
args: [],
|
|
args: [],
|
|
-source: "testNewWithValues\x0a<\x0afunction theTestPrototype() {\x0a\x09this.name = \x22theTestPrototype\x22;\x0a}\x0afunction theTestConstructor(arg1, arg2, arg3) {}\x0atheTestConstructor.prototype = new theTestPrototype;\x0a\x0avar theWrappedConstructor = _st(theTestConstructor);\x0avar theResult = theWrappedConstructor._newWithValues_([1, 2, 3]);\x0a\x0aself._assert_equals_(Object.getPrototypeOf(theResult).name, 'theTestPrototype');\x0a>",
|
|
|
|
|
|
+source: "testNewWithValues\x0a<\x0afunction theTestPrototype() {this.name = \x22theTestPrototype\x22;}\x0afunction theTestConstructor(arg1, arg2, arg3) {}\x0atheTestConstructor.prototype = new theTestPrototype;\x0a\x0avar theWrappedConstructor = _st(theTestConstructor);\x0avar theResult = theWrappedConstructor._newWithValues_([1, 2, 3]);\x0aself._assert_equals_(Object.getPrototypeOf(theResult).name, 'theTestPrototype');\x0a\x0a\x22newWithValues: cannot help if the argument list is wrong, and should warn that a mistake was made.\x22\x0afunction constructionShouldFail() {var anotherResult = theWrappedConstructor._newWithValues_('This is so wrong');}\x0aself._should_raise_(_st(constructionShouldFail), smalltalk.Error);\x0a>",
|
|
messageSends: [],
|
|
messageSends: [],
|
|
referencedClasses: []
|
|
referencedClasses: []
|
|
}),
|
|
}),
|