|
@@ -1302,6 +1302,22 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.CollectionTest);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "collectionSize",
|
|
|
+protocol: 'fixture',
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+self._subclassResponsibility();
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"collectionSize",{},smalltalk.CollectionTest)})},
|
|
|
+args: [],
|
|
|
+source: "collectionSize\x0a\x09\x22Answers size of self collection.\x22\x0a\x0a\x09self subclassResponsibility",
|
|
|
+messageSends: ["subclassResponsibility"],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+smalltalk.CollectionTest);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "collectionWithDuplicates",
|
|
@@ -1800,11 +1816,11 @@ $1=_st(_st(self._collectionClass())._new())._size();
|
|
|
$ctx1.sendIdx["size"]=1;
|
|
|
self._assert_equals_($1,(0));
|
|
|
$ctx1.sendIdx["assert:equals:"]=1;
|
|
|
-self._assert_equals_(_st(self._collection())._size(),(4));
|
|
|
+self._assert_equals_(_st(self._collection())._size(),self._collectionSize());
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"testSize",{},smalltalk.CollectionTest)})},
|
|
|
args: [],
|
|
|
-source: "testSize\x0a\x09self assert: self collectionClass new size equals: 0.\x0a\x09self assert: self collection size equals: 4",
|
|
|
-messageSends: ["assert:equals:", "size", "new", "collectionClass", "collection"],
|
|
|
+source: "testSize\x0a\x09self assert: self collectionClass new size equals: 0.\x0a\x09self assert: self collection size equals: self collectionSize",
|
|
|
+messageSends: ["assert:equals:", "size", "new", "collectionClass", "collection", "collectionSize"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.CollectionTest);
|
|
@@ -2212,6 +2228,22 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.HashedCollectionTest);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "collectionSize",
|
|
|
+protocol: 'fixture',
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+return (4);
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"collectionSize",{},smalltalk.HashedCollectionTest)})},
|
|
|
+args: [],
|
|
|
+source: "collectionSize\x0a\x09^ 4",
|
|
|
+messageSends: [],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+smalltalk.HashedCollectionTest);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "collectionWithDuplicates",
|
|
@@ -2433,6 +2465,22 @@ referencedClasses: ["Dictionary"]
|
|
|
}),
|
|
|
smalltalk.DictionaryTest);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "collectionSize",
|
|
|
+protocol: 'fixture',
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+return (4);
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"collectionSize",{},smalltalk.DictionaryTest)})},
|
|
|
+args: [],
|
|
|
+source: "collectionSize\x0a\x09^ 4",
|
|
|
+messageSends: [],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+smalltalk.DictionaryTest);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "collectionWithDuplicates",
|
|
@@ -2870,37 +2918,6 @@ referencedClasses: ["Dictionary"]
|
|
|
}),
|
|
|
smalltalk.DictionaryTest);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
-selector: "testSize",
|
|
|
-protocol: 'tests',
|
|
|
-fn: function (){
|
|
|
-var self=this;
|
|
|
-var d;
|
|
|
-function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
-var $1,$2;
|
|
|
-d=_st($Dictionary())._new();
|
|
|
-$1=_st(d)._size();
|
|
|
-$ctx1.sendIdx["size"]=1;
|
|
|
-self._assert_equals_($1,(0));
|
|
|
-$ctx1.sendIdx["assert:equals:"]=1;
|
|
|
-_st(d)._at_put_((1),(2));
|
|
|
-$ctx1.sendIdx["at:put:"]=1;
|
|
|
-$2=_st(d)._size();
|
|
|
-$ctx1.sendIdx["size"]=2;
|
|
|
-self._assert_equals_($2,(1));
|
|
|
-$ctx1.sendIdx["assert:equals:"]=2;
|
|
|
-_st(d)._at_put_((2),(3));
|
|
|
-self._assert_equals_(_st(d)._size(),(2));
|
|
|
-return self}, function($ctx1) {$ctx1.fill(self,"testSize",{d:d},smalltalk.DictionaryTest)})},
|
|
|
-args: [],
|
|
|
-source: "testSize\x0a\x09| d |\x0a\x0a\x09d := Dictionary new.\x0a\x09self assert: d size equals: 0.\x0a\x0a\x09d at: 1 put: 2.\x0a\x09self assert: d size equals: 1.\x0a\x0a\x09d at: 2 put: 3.\x0a\x09self assert: d size equals: 2.",
|
|
|
-messageSends: ["new", "assert:equals:", "size", "at:put:"],
|
|
|
-referencedClasses: ["Dictionary"]
|
|
|
-}),
|
|
|
-smalltalk.DictionaryTest);
|
|
|
-
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "testValues",
|
|
@@ -3386,6 +3403,22 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.ArrayTest);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "collectionSize",
|
|
|
+protocol: 'fixture',
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+return (4);
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"collectionSize",{},smalltalk.ArrayTest)})},
|
|
|
+args: [],
|
|
|
+source: "collectionSize\x0a\x09^ 4",
|
|
|
+messageSends: [],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+smalltalk.ArrayTest);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "collectionWithDuplicates",
|
|
@@ -3778,6 +3811,22 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.StringTest);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "collectionSize",
|
|
|
+protocol: 'fixture',
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+return (5);
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"collectionSize",{},smalltalk.StringTest)})},
|
|
|
+args: [],
|
|
|
+source: "collectionSize\x0a\x09^ 5",
|
|
|
+messageSends: [],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+smalltalk.StringTest);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "collectionWithDuplicates",
|
|
@@ -4322,27 +4371,6 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.StringTest);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
-selector: "testSize",
|
|
|
-protocol: 'tests',
|
|
|
-fn: function (){
|
|
|
-var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
-var $1;
|
|
|
-$1="smalltalk"._size();
|
|
|
-$ctx1.sendIdx["size"]=1;
|
|
|
-self._assert_equals_($1,(9));
|
|
|
-$ctx1.sendIdx["assert:equals:"]=1;
|
|
|
-self._assert_equals_(""._size(),(0));
|
|
|
-return self}, function($ctx1) {$ctx1.fill(self,"testSize",{},smalltalk.StringTest)})},
|
|
|
-args: [],
|
|
|
-source: "testSize\x0a\x09self assert: 'smalltalk' size equals: 9.\x0a\x09self assert: '' size equals: 0",
|
|
|
-messageSends: ["assert:equals:", "size"],
|
|
|
-referencedClasses: []
|
|
|
-}),
|
|
|
-smalltalk.StringTest);
|
|
|
-
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "testStreamContents",
|