JAL-3438 spotless for 2.11.2.0
[jalview.git] / test / jalview / util / QuickSortTest.java
index f09dee9..bf9d16b 100644 (file)
@@ -120,8 +120,9 @@ public class QuickSortTest
     String[] values = new String[] { "JOHN", "henry", "lucy", "henry",
         "ALISON" };
     QuickSort.sort(values, things);
-    assertTrue(Arrays.equals(new String[] { "lucy", "henry", "henry",
-        "JOHN", "ALISON" }, values));
+    assertTrue(
+            Arrays.equals(new String[]
+            { "lucy", "henry", "henry", "JOHN", "ALISON" }, values));
     assertTrue(Arrays.equals(new Object[] { c3, c2, c4, c1, c5 }, things));
   }
 
@@ -136,8 +137,9 @@ public class QuickSortTest
     QuickSort.sort(values, letters);
     assertTrue(Arrays.equals(new int[] { 1, 2, 3, 4, 4 }, values));
     // this fails - do we care?
-    assertTrue(Arrays.equals(new Object[] { "Z", "Y", "A", "X", "B" },
-            letters));
+    assertTrue(
+            Arrays.equals(new Object[]
+            { "Z", "Y", "A", "X", "B" }, letters));
   }
 
   /**
@@ -194,10 +196,9 @@ public class QuickSortTest
       QuickSort.sort(counts, residues);
     }
     long elapsed = System.currentTimeMillis() - start;
-    System.out
-            .println(String
-                    .format("Time for %d optimised sorts of mostly zeros array length %d was %dms",
-                            iterations, counts.length, elapsed));
+    System.out.println(String.format(
+            "Time for %d optimised sorts of mostly zeros array length %d was %dms",
+            iterations, counts.length, elapsed));
 
     /*
      * time it using unoptimised external sort
@@ -212,10 +213,9 @@ public class QuickSortTest
       QuickSort.charSortByFloat(counts, residues, true);
     }
     elapsed = System.currentTimeMillis() - start;
-    System.out
-            .println(String
-                    .format("Time for %d external sorts of mostly zeros array length %d was %dms",
-                            iterations, counts.length, elapsed));
+    System.out.println(String.format(
+            "Time for %d external sorts of mostly zeros array length %d was %dms",
+            iterations, counts.length, elapsed));
 
     /*
      * optimised external sort, well-filled array
@@ -234,10 +234,9 @@ public class QuickSortTest
       QuickSort.sort(counts, residues);
     }
     elapsed = System.currentTimeMillis() - start;
-    System.out
-            .println(String
-                    .format("Time for %d optimised sorts of non-zeros array length %d was %dms",
-                            iterations, counts.length, elapsed));
+    System.out.println(String.format(
+            "Time for %d optimised sorts of non-zeros array length %d was %dms",
+            iterations, counts.length, elapsed));
 
     /*
      * time unoptimised external sort, filled array
@@ -249,10 +248,9 @@ public class QuickSortTest
       QuickSort.charSortByFloat(counts, residues, true);
     }
     elapsed = System.currentTimeMillis() - start;
-    System.out
-            .println(String
-                    .format("Time for %d external sorts of non-zeros array length %d was %dms",
-                            iterations, counts.length, elapsed));
+    System.out.println(String.format(
+            "Time for %d external sorts of non-zeros array length %d was %dms",
+            iterations, counts.length, elapsed));
   }
 
   /**
@@ -357,16 +355,18 @@ public class QuickSortTest
      * sort descending
      */
     QuickSort.sortByString(values, things, false);
-    assertTrue(Arrays.equals(new String[] { "lucy", "henry", "henry",
-        "JOHN", "ALISON" }, values));
+    assertTrue(
+            Arrays.equals(new String[]
+            { "lucy", "henry", "henry", "JOHN", "ALISON" }, values));
     assertTrue(Arrays.equals(new Object[] { c3, c2, c4, c1, c5 }, things));
 
     /*
      * resort ascending
      */
     QuickSort.sortByString(values, things, true);
-    assertTrue(Arrays.equals(new String[] { "ALISON", "JOHN", "henry",
-        "henry", "lucy" }, values));
+    assertTrue(
+            Arrays.equals(new String[]
+            { "ALISON", "JOHN", "henry", "henry", "lucy" }, values));
     // sort is stable: c2/c4 do not swap order
     assertTrue(Arrays.equals(new Object[] { c5, c1, c2, c4, c3 }, things));
   }