Forráskód Böngészése

Small Collection tests touches.

Herbert Vojčík 7 éve
szülő
commit
df6b0c728d
2 módosított fájl, 18 hozzáadás és 42 törlés
  1. 11 29
      src/Kernel-Tests.js
  2. 7 13
      src/Kernel-Tests.st

+ 11 - 29
src/Kernel-Tests.js

@@ -2942,7 +2942,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "collectionWithDuplicates\x0a\x09\x22Answers pre-filled collection of type tested,\x0a\x09with exactly five distinct elements,\x0a\x09some of them appearing multiple times, if possible.\x22\x0a\x0a\x09self subclassResponsibility",
+source: "collectionWithDuplicates\x0a\x09\x22Answers pre-filled collection of type tested,\x0a\x09with exactly six distinct elements,\x0a\x09some of them appearing multiple times, if possible.\x22\x0a\x0a\x09self subclassResponsibility",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: ["subclassResponsibility"]
@@ -3007,24 +3007,6 @@ messageSends: ["initialize"]
 }),
 $globals.CollectionTest);
 
-$core.addMethod(
-$core.method({
-selector: "isCollectionReadOnly",
-protocol: "testing",
-fn: function (){
-var self=this,$self=this;
-return false;
-
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "isCollectionReadOnly\x0a\x09^ false",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.CollectionTest);
-
 $core.addMethod(
 $core.method({
 selector: "sampleNewValue",
@@ -5025,9 +5007,9 @@ $globals.IndexableCollectionTest);
 
 $core.addMethod(
 $core.method({
-selector: "sampleNewIndex",
+selector: "nonIndexesDo:",
 protocol: "fixture",
-fn: function (){
+fn: function (aBlock){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -5035,12 +5017,12 @@ return $core.withContext(function($ctx1) {
 $self._subclassResponsibility();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"sampleNewIndex",{},$globals.IndexableCollectionTest)});
+}, function($ctx1) {$ctx1.fill(self,"nonIndexesDo:",{aBlock:aBlock},$globals.IndexableCollectionTest)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "sampleNewIndex\x0a\x09\x22Answers a value that can be used as index in at:put: or at:ifAbsentPut:\x22\x0a\x09\x0a\x09self subclassResponsibility",
+args: ["aBlock"],
+source: "nonIndexesDo: aBlock\x0a\x09\x22Executes block a few times,\x0a\x09each time passing value that is known\x0a\x09not to be an index, as the first parameter\x22\x0a\x09\x0a\x09self subclassResponsibility",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: ["subclassResponsibility"]
@@ -5049,9 +5031,9 @@ $globals.IndexableCollectionTest);
 
 $core.addMethod(
 $core.method({
-selector: "sampleNonIndexesDo:",
+selector: "sampleNewIndex",
 protocol: "fixture",
-fn: function (aBlock){
+fn: function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -5059,12 +5041,12 @@ return $core.withContext(function($ctx1) {
 $self._subclassResponsibility();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"sampleNonIndexesDo:",{aBlock:aBlock},$globals.IndexableCollectionTest)});
+}, function($ctx1) {$ctx1.fill(self,"sampleNewIndex",{},$globals.IndexableCollectionTest)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aBlock"],
-source: "sampleNonIndexesDo: aBlock\x0a\x09\x22Executes block a few times,\x0a\x09each time passing value that is known\x0a\x09not to be an index, as the first parameter\x22\x0a\x09\x0a\x09self subclassResponsibility",
+args: [],
+source: "sampleNewIndex\x0a\x09\x22Answers a value that can be used as index in at:put: or at:ifAbsentPut:\x22\x0a\x09\x0a\x09self subclassResponsibility",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: ["subclassResponsibility"]

+ 7 - 13
src/Kernel-Tests.st

@@ -584,7 +584,7 @@ collectionSize
 
 collectionWithDuplicates
 	"Answers pre-filled collection of type tested,
-	with exactly five distinct elements,
+	with exactly six distinct elements,
 	some of them appearing multiple times, if possible."
 
 	self subclassResponsibility
@@ -621,12 +621,6 @@ initialize
 	sampleBlock := []
 ! !
 
-!CollectionTest methodsFor: 'testing'!
-
-isCollectionReadOnly
-	^ false
-! !
-
 !CollectionTest methodsFor: 'tests'!
 
 testAddAll
@@ -858,16 +852,16 @@ collectionWithNewValue
 	self subclassResponsibility
 !
 
-sampleNewIndex
-	"Answers a value that can be used as index in at:put: or at:ifAbsentPut:"
+nonIndexesDo: aBlock
+	"Executes block a few times,
+	each time passing value that is known
+	not to be an index, as the first parameter"
 	
 	self subclassResponsibility
 !
 
-sampleNonIndexesDo: aBlock
-	"Executes block a few times,
-	each time passing value that is known
-	not to be an index, as the first parameter"
+sampleNewIndex
+	"Answers a value that can be used as index in at:put: or at:ifAbsentPut:"
 	
 	self subclassResponsibility
 !