#QUALITY by cg
authorClaus Gittinger <cg@exept.de>
Wed, 20 Apr 2016 12:54:11 +0200
changeset 1396 2d62a289b79e
parent 1395 7fb21e6bc3ab
child 1397 5d1f10293f17
#QUALITY by cg class: RegressionTests::CollectionTests category of: #testByteArrayReverse #testByteArrayReversed
RegressionTests__CollectionTests.st
--- a/RegressionTests__CollectionTests.st	Wed Apr 20 12:53:45 2016 +0200
+++ b/RegressionTests__CollectionTests.st	Wed Apr 20 12:54:11 2016 +0200
@@ -73,6 +73,34 @@
         nonEmpty := OrderedCollection with: #x.
 ! !
 
+!CollectionTests methodsFor:'tests-byteArray'!
+
+testByteArrayReverse
+     1 to:1024 do:[:i|
+        |bytes test rBytes|
+
+        bytes := ((1 to:i) asArray collect:[:i | i bitAnd:255]) asByteArray.
+        test := ((i to:1 by:-1) asArray collect:[:i | i bitAnd:255]) asByteArray.
+        rBytes := bytes copy.
+        self assert:(rBytes reverse = test).
+
+        rBytes := bytes copy.
+        self assert:(rBytes reverse reverse = bytes).
+     ].
+!
+
+testByteArrayReversed
+     1 to:1024 do:[:i|
+        |bytes test rBytes|
+
+        bytes := ((1 to:i) asArray collect:[:i | i bitAnd:255]) asByteArray.
+        test := ((i to:1 by:-1) asArray collect:[:i | i bitAnd:255]) asByteArray.
+        self assert:(bytes reversed = test).
+
+        self assert:(bytes reversed reversed = bytes).
+     ].
+! !
+
 !CollectionTests methodsFor:'tests-dictionary'!
 
 testDictionary01
@@ -1178,32 +1206,6 @@
 
 !CollectionTests methodsFor:'tests-sorting'!
 
-testByteArrayReverse
-     1 to:1024 do:[:i|
-        |bytes test rBytes|
-
-        bytes := ((1 to:i) asArray collect:[:i | i bitAnd:255]) asByteArray.
-        test := ((i to:1 by:-1) asArray collect:[:i | i bitAnd:255]) asByteArray.
-        rBytes := bytes copy.
-        self assert:(rBytes reverse = test).
-
-        rBytes := bytes copy.
-        self assert:(rBytes reverse reverse = bytes).
-     ].
-!
-
-testByteArrayReversed
-     1 to:1024 do:[:i|
-        |bytes test rBytes|
-
-        bytes := ((1 to:i) asArray collect:[:i | i bitAnd:255]) asByteArray.
-        test := ((i to:1 by:-1) asArray collect:[:i | i bitAnd:255]) asByteArray.
-        self assert:(bytes reversed = test).
-
-        self assert:(bytes reversed reversed = bytes).
-     ].
-!
-
 testLargest
     | col |