TestCase.st
changeset 669 5c60313710b3
parent 648 6d39f37eb1cd
child 685 00195d0e5ebc
child 771 d1c18e4f543c
--- a/TestCase.st	Thu Oct 13 19:08:17 2016 +0200
+++ b/TestCase.st	Wed Nov 02 01:50:45 2016 +0100
@@ -99,14 +99,16 @@
 
     answer := Set withAll: self testSelectors.
     self shouldInheritSelectors ifTrue:[
-	pivotClass := self superclass.
-	lookupRoot := self lookupHierarchyRoot.
-	[pivotClass == lookupRoot] whileFalse:[
-	    answer addAll: pivotClass testSelectors.
-	    pivotClass := pivotClass superclass.
-	]
+        pivotClass := self superclass.
+        lookupRoot := self lookupHierarchyRoot.
+        [pivotClass == lookupRoot] whileFalse:[
+            answer addAll: pivotClass testSelectors.
+            pivotClass := pivotClass superclass.
+        ]
     ].
-    ^answer asSortedCollection asOrderedCollection
+    answer := answer asOrderedCollection.
+    answer sort.
+    ^ answer 
 
     "Modified: / 21-08-2011 / 15:06:11 / cg"
 !
@@ -359,9 +361,15 @@
 !
 
 testSelectors
-	"The API method is allTestSelectors which now includes #shouldInheritSelectors and so handles all cases.  Unlike that method, this does not guarantee to return a sorted ordered collection."
+    "The API method is allTestSelectors which now includes #shouldInheritSelectors and so handles all cases.  Unlike that method, this does not guarantee to return a sorted ordered collection."
 
-	^self sunitSelectors select: [:each | 'test*' sunitMatch: each]
+    |selectors|
+    
+    selectors := self sunitSelectors 
+                    select: [:each | 'test*' sunitMatch: each].
+    selectors := selectors asOrderedCollection.
+    selectors sort.
+    ^ selectors
 ! !
 
 !TestCase class methodsFor:'queries'!