|
@@ -7,7 +7,6 @@ fn: function (){
|
|
|
var self=this;
|
|
|
smalltalk.send(self, "_assert_equals_", [unescape("hello%2Cworld"), smalltalk.send(unescape("%2C"), "_join_", [["hello", "world"]])]);
|
|
|
return self;}
|
|
|
-]
|
|
|
}),
|
|
|
smalltalk.StringTest);
|
|
|
|
|
@@ -19,7 +18,6 @@ fn: function (){
|
|
|
var self=this;
|
|
|
smalltalk.send(self, "_assert_equals_", ["hello world", smalltalk.send(smalltalk.String, "_streamContents_", [(function(aStream){return (function($rec){smalltalk.send($rec, "_nextPutAll_", ["hello"]);smalltalk.send($rec, "_space", []);return smalltalk.send($rec, "_nextPutAll_", ["world"]);})(aStream);})])]);
|
|
|
return self;}
|
|
|
-]
|
|
|
}),
|
|
|
smalltalk.StringTest);
|
|
|
|
|
@@ -32,7 +30,6 @@ var self=this;
|
|
|
smalltalk.send(self, "_assert_", [smalltalk.send("jtalk", "_includesSubString_", ["alk"])]);
|
|
|
smalltalk.send(self, "_deny_", [smalltalk.send("jtalk", "_includesSubString_", ["zork"])]);
|
|
|
return self;}
|
|
|
-]
|
|
|
}),
|
|
|
smalltalk.StringTest);
|
|
|
|
|
@@ -47,9 +44,22 @@ fn: function (){
|
|
|
var self=this;
|
|
|
smalltalk.send(self, "_assert_equals_", [unescape("a%20Dictionary%28%27firstname%27%20-%3E%20%27James%27%20%2C%20%27lastname%27%20-%3E%20%27Bond%27%29"), (function($rec){smalltalk.send($rec, "_at_put_", ["firstname", "James"]);smalltalk.send($rec, "_at_put_", ["lastname", "Bond"]);return smalltalk.send($rec, "_printString", []);})(smalltalk.send(smalltalk.Dictionary, "_new", []))]);
|
|
|
return self;}
|
|
|
-]
|
|
|
}),
|
|
|
smalltalk.DictionaryTest);
|
|
|
|
|
|
|
|
|
|
|
|
+smalltalk.addClass('NumberTest', smalltalk.TestCase, [], 'Kernel-Tests');
|
|
|
+smalltalk.addMethod(
|
|
|
+'_testNegated',
|
|
|
+smalltalk.method({
|
|
|
+selector: 'testNegated',
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+smalltalk.send(self, "_assert_equals_", [(($receiver = smalltalk.send((3), "_negated", [])).klass === smalltalk.Number) ? $receiver +(4) : smalltalk.send($receiver, "__plus", [(4)]), (1)]);
|
|
|
+return self;}
|
|
|
+}),
|
|
|
+smalltalk.NumberTest);
|
|
|
+
|
|
|
+
|
|
|
+
|