test/java/util/Comparators/BasicTest.java

Print this page
rev 6853 : 8010279: java.util.Stream.min/max((Comparator)null) is not consistent in throwing (unspecified) NPE

@@ -22,11 +22,11 @@
  */
 
 /*
  * @test
  * @bug 8001667
- * @run testng ComparatorsTest
+ * @run testng BasicTest
  */
 
 import java.util.Comparator;
 import java.util.Comparators;
 import java.util.AbstractMap;

@@ -44,11 +44,11 @@
 
 /**
  * Unit tests for helper methods in Comparators
  */
 @Test(groups = "unit")
-public class ComparatorsTest {
+public class BasicTest {
     private static class Thing {
         public final int intField;
         public final long longField;
         public final double doubleField;
         public final String stringField;

@@ -93,11 +93,11 @@
 
     public void testIntComparator() {
         Thing[] things = new Thing[intValues.length];
         for (int i=0; i<intValues.length; i++)
             things[i] = new Thing(intValues[i], 0L, 0.0, null);
-        Comparator<Thing> comp = Comparators.comparing(new ToIntFunction<ComparatorsTest.Thing>() {
+        Comparator<Thing> comp = Comparators.comparing(new ToIntFunction<BasicTest.Thing>() {
             @Override
             public int applyAsInt(Thing thing) {
                 return thing.getIntField();
             }
         });

@@ -107,11 +107,11 @@
 
     public void testLongComparator() {
         Thing[] things = new Thing[longValues.length];
         for (int i=0; i<longValues.length; i++)
             things[i] = new Thing(0, longValues[i], 0.0, null);
-        Comparator<Thing> comp = Comparators.comparing(new ToLongFunction<ComparatorsTest.Thing>() {
+        Comparator<Thing> comp = Comparators.comparing(new ToLongFunction<BasicTest.Thing>() {
             @Override
             public long applyAsLong(Thing thing) {
                 return thing.getLongField();
             }
         });

@@ -121,11 +121,11 @@
 
     public void testDoubleComparator() {
         Thing[] things = new Thing[doubleValues.length];
         for (int i=0; i<doubleValues.length; i++)
             things[i] = new Thing(0, 0L, doubleValues[i], null);
-        Comparator<Thing> comp = Comparators.comparing(new ToDoubleFunction<ComparatorsTest.Thing>() {
+        Comparator<Thing> comp = Comparators.comparing(new ToDoubleFunction<BasicTest.Thing>() {
             @Override
             public double applyAsDouble(Thing thing) {
                 return thing.getDoubleField();
             }
         });