|
@@ -1883,6 +1883,26 @@ smalltalk.addClass('SequenceableCollectionTest', smalltalk.IndexableCollectionTe
|
|
|
|
|
|
|
|
|
|
smalltalk.addClass('ArrayTest', smalltalk.SequenceableCollectionTest, [], 'Kernel-Tests');
|
|
smalltalk.addClass('ArrayTest', smalltalk.SequenceableCollectionTest, [], 'Kernel-Tests');
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "testAddFirst",
|
|
|
|
+category: 'tests',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $1,$2;
|
|
|
|
+$1=[(2), (3), (4), (5)];
|
|
|
|
+_st($1)._addFirst_((1));
|
|
|
|
+$2=_st($1)._yourself();
|
|
|
|
+self._assert_equals_($2,[(1), (2), (3), (4), (5)]);
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"testAddFirst",{},smalltalk.ArrayTest)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "testAddFirst\x0a\x09self assert: (#(2 3 4 5) addFirst: 1; yourself) equals: #(1 2 3 4 5)",
|
|
|
|
+messageSends: ["assert:equals:", "addFirst:", "yourself"],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.ArrayTest);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "testAtIfAbsent",
|
|
selector: "testAtIfAbsent",
|