]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/junit/RuntimeTestCollector.java
Merge "Ensure GetElementClassRequest is not constructed without elementFactory"
[simantics/platform.git] / bundles / org.simantics.tests.modelled / src / org / simantics / tests / modelled / junit / RuntimeTestCollector.java
index 06b81687ec025f1cc17a1bbf5cbb0dbf8155589f..0ab31b3f01a8961ad652f36ca980d4a9a475e8b7 100644 (file)
@@ -18,6 +18,7 @@ import org.simantics.layer0.Layer0;
 import org.simantics.modeling.ModelingUtils;\r
 import org.simantics.scl.runtime.tuple.Tuple0;\r
 import org.simantics.tests.modelled.ontology.TestsResource;\r
+import org.simantics.utils.strings.AlphanumComparator;\r
 \r
 public class RuntimeTestCollector {\r
 \r
@@ -60,10 +61,11 @@ public class RuntimeTestCollector {
                                 }\r
                                 \r
                                 testRunners.sort((test1, test2) -> {\r
-                                    if (test1.getPriority() <= test2.getPriority())\r
+                                    if (test1.getPriority() < test2.getPriority())\r
                                         return -1;\r
-                                    else\r
+                                    else if (test1.getPriority() > test2.getPriority())\r
                                         return 1;\r
+                                    else return AlphanumComparator.COMPARATOR.compare(test1.getName(), test2.getName());\r
                                 });\r
                                 suite.addChildren(testRunners);\r
                                 suites.add(suite);\r