Skip to content

Commit ae85d89

Browse files
author
Xueming Shen
committed
8373389: Two jdk/incubator/vector/ tests fails after JDK-8371446
Reviewed-by: psandoz
1 parent 66d7b0c commit ae85d89

31 files changed

+221
-44
lines changed

test/jdk/jdk/incubator/vector/AbstractVectorTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,7 @@ static int[] fillInts(int[] a, IntOp f) {
119119
Arrays.fill(a, true);
120120
return a;
121121
}),
122-
withToString("mask[false]", boolean[]::new),
123-
withToString("mask[random]", (int s) -> {
124-
return fill_boolean(s,_i -> RAND.nextBoolean());
125-
})
122+
withToString("mask[false]", boolean[]::new)
126123
);
127124

128125
static final List<List<IntFunction<boolean[]>>>

test/jdk/jdk/incubator/vector/Byte128VectorTests.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,12 @@ static byte bits(byte e) {
11251125
.flatMap(pair -> BYTE_SATURATING_GENERATORS_ASSOC.stream().map(f -> List.of(pair.get(0), pair.get(1), f)))
11261126
.collect(Collectors.toList());
11271127

1128+
@DataProvider
1129+
public Object[][] boolUnaryOpProvider() {
1130+
return BOOL_ARRAY_GENERATORS.stream().
1131+
map(f -> new Object[]{f}).
1132+
toArray(Object[][]::new);
1133+
}
11281134

11291135
static final List<List<IntFunction<byte[]>>> BYTE_GENERATOR_TRIPLES =
11301136
BYTE_GENERATOR_PAIRS.stream().
@@ -4503,7 +4509,7 @@ static boolean anyTrue(boolean[] a, int idx) {
45034509
return res;
45044510
}
45054511

4506-
@Test(dataProvider = "boolMaskUnaryOpProvider")
4512+
@Test(dataProvider = "boolUnaryOpProvider")
45074513
static void anyTrueByte128VectorTests(IntFunction<boolean[]> fm) {
45084514
boolean[] mask = fm.apply(SPECIES.length());
45094515
boolean[] r = fmr.apply(SPECIES.length());
@@ -4527,7 +4533,7 @@ static boolean allTrue(boolean[] a, int idx) {
45274533
return res;
45284534
}
45294535

4530-
@Test(dataProvider = "boolMaskUnaryOpProvider")
4536+
@Test(dataProvider = "boolUnaryOpProvider")
45314537
static void allTrueByte128VectorTests(IntFunction<boolean[]> fm) {
45324538
boolean[] mask = fm.apply(SPECIES.length());
45334539
boolean[] r = fmr.apply(SPECIES.length());

test/jdk/jdk/incubator/vector/Byte256VectorTests.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,12 @@ static byte bits(byte e) {
11251125
.flatMap(pair -> BYTE_SATURATING_GENERATORS_ASSOC.stream().map(f -> List.of(pair.get(0), pair.get(1), f)))
11261126
.collect(Collectors.toList());
11271127

1128+
@DataProvider
1129+
public Object[][] boolUnaryOpProvider() {
1130+
return BOOL_ARRAY_GENERATORS.stream().
1131+
map(f -> new Object[]{f}).
1132+
toArray(Object[][]::new);
1133+
}
11281134

11291135
static final List<List<IntFunction<byte[]>>> BYTE_GENERATOR_TRIPLES =
11301136
BYTE_GENERATOR_PAIRS.stream().
@@ -4503,7 +4509,7 @@ static boolean anyTrue(boolean[] a, int idx) {
45034509
return res;
45044510
}
45054511

4506-
@Test(dataProvider = "boolMaskUnaryOpProvider")
4512+
@Test(dataProvider = "boolUnaryOpProvider")
45074513
static void anyTrueByte256VectorTests(IntFunction<boolean[]> fm) {
45084514
boolean[] mask = fm.apply(SPECIES.length());
45094515
boolean[] r = fmr.apply(SPECIES.length());
@@ -4527,7 +4533,7 @@ static boolean allTrue(boolean[] a, int idx) {
45274533
return res;
45284534
}
45294535

4530-
@Test(dataProvider = "boolMaskUnaryOpProvider")
4536+
@Test(dataProvider = "boolUnaryOpProvider")
45314537
static void allTrueByte256VectorTests(IntFunction<boolean[]> fm) {
45324538
boolean[] mask = fm.apply(SPECIES.length());
45334539
boolean[] r = fmr.apply(SPECIES.length());

test/jdk/jdk/incubator/vector/Byte512VectorTests.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,12 @@ static byte bits(byte e) {
11251125
.flatMap(pair -> BYTE_SATURATING_GENERATORS_ASSOC.stream().map(f -> List.of(pair.get(0), pair.get(1), f)))
11261126
.collect(Collectors.toList());
11271127

1128+
@DataProvider
1129+
public Object[][] boolUnaryOpProvider() {
1130+
return BOOL_ARRAY_GENERATORS.stream().
1131+
map(f -> new Object[]{f}).
1132+
toArray(Object[][]::new);
1133+
}
11281134

11291135
static final List<List<IntFunction<byte[]>>> BYTE_GENERATOR_TRIPLES =
11301136
BYTE_GENERATOR_PAIRS.stream().
@@ -4503,7 +4509,7 @@ static boolean anyTrue(boolean[] a, int idx) {
45034509
return res;
45044510
}
45054511

4506-
@Test(dataProvider = "boolMaskUnaryOpProvider")
4512+
@Test(dataProvider = "boolUnaryOpProvider")
45074513
static void anyTrueByte512VectorTests(IntFunction<boolean[]> fm) {
45084514
boolean[] mask = fm.apply(SPECIES.length());
45094515
boolean[] r = fmr.apply(SPECIES.length());
@@ -4527,7 +4533,7 @@ static boolean allTrue(boolean[] a, int idx) {
45274533
return res;
45284534
}
45294535

4530-
@Test(dataProvider = "boolMaskUnaryOpProvider")
4536+
@Test(dataProvider = "boolUnaryOpProvider")
45314537
static void allTrueByte512VectorTests(IntFunction<boolean[]> fm) {
45324538
boolean[] mask = fm.apply(SPECIES.length());
45334539
boolean[] r = fmr.apply(SPECIES.length());

test/jdk/jdk/incubator/vector/Byte64VectorTests.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,12 @@ static byte bits(byte e) {
11251125
.flatMap(pair -> BYTE_SATURATING_GENERATORS_ASSOC.stream().map(f -> List.of(pair.get(0), pair.get(1), f)))
11261126
.collect(Collectors.toList());
11271127

1128+
@DataProvider
1129+
public Object[][] boolUnaryOpProvider() {
1130+
return BOOL_ARRAY_GENERATORS.stream().
1131+
map(f -> new Object[]{f}).
1132+
toArray(Object[][]::new);
1133+
}
11281134

11291135
static final List<List<IntFunction<byte[]>>> BYTE_GENERATOR_TRIPLES =
11301136
BYTE_GENERATOR_PAIRS.stream().
@@ -4503,7 +4509,7 @@ static boolean anyTrue(boolean[] a, int idx) {
45034509
return res;
45044510
}
45054511

4506-
@Test(dataProvider = "boolMaskUnaryOpProvider")
4512+
@Test(dataProvider = "boolUnaryOpProvider")
45074513
static void anyTrueByte64VectorTests(IntFunction<boolean[]> fm) {
45084514
boolean[] mask = fm.apply(SPECIES.length());
45094515
boolean[] r = fmr.apply(SPECIES.length());
@@ -4527,7 +4533,7 @@ static boolean allTrue(boolean[] a, int idx) {
45274533
return res;
45284534
}
45294535

4530-
@Test(dataProvider = "boolMaskUnaryOpProvider")
4536+
@Test(dataProvider = "boolUnaryOpProvider")
45314537
static void allTrueByte64VectorTests(IntFunction<boolean[]> fm) {
45324538
boolean[] mask = fm.apply(SPECIES.length());
45334539
boolean[] r = fmr.apply(SPECIES.length());

test/jdk/jdk/incubator/vector/ByteMaxVectorTests.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,6 +1130,12 @@ static byte bits(byte e) {
11301130
.flatMap(pair -> BYTE_SATURATING_GENERATORS_ASSOC.stream().map(f -> List.of(pair.get(0), pair.get(1), f)))
11311131
.collect(Collectors.toList());
11321132

1133+
@DataProvider
1134+
public Object[][] boolUnaryOpProvider() {
1135+
return BOOL_ARRAY_GENERATORS.stream().
1136+
map(f -> new Object[]{f}).
1137+
toArray(Object[][]::new);
1138+
}
11331139

11341140
static final List<List<IntFunction<byte[]>>> BYTE_GENERATOR_TRIPLES =
11351141
BYTE_GENERATOR_PAIRS.stream().
@@ -4508,7 +4514,7 @@ static boolean anyTrue(boolean[] a, int idx) {
45084514
return res;
45094515
}
45104516

4511-
@Test(dataProvider = "boolMaskUnaryOpProvider")
4517+
@Test(dataProvider = "boolUnaryOpProvider")
45124518
static void anyTrueByteMaxVectorTests(IntFunction<boolean[]> fm) {
45134519
boolean[] mask = fm.apply(SPECIES.length());
45144520
boolean[] r = fmr.apply(SPECIES.length());
@@ -4532,7 +4538,7 @@ static boolean allTrue(boolean[] a, int idx) {
45324538
return res;
45334539
}
45344540

4535-
@Test(dataProvider = "boolMaskUnaryOpProvider")
4541+
@Test(dataProvider = "boolUnaryOpProvider")
45364542
static void allTrueByteMaxVectorTests(IntFunction<boolean[]> fm) {
45374543
boolean[] mask = fm.apply(SPECIES.length());
45384544
boolean[] r = fmr.apply(SPECIES.length());

test/jdk/jdk/incubator/vector/Double128VectorTests.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,12 @@ static long bits(double e) {
12171217
flatMap(fa -> DOUBLE_GENERATORS.stream().skip(1).map(fb -> List.of(fa, fb))).
12181218
collect(Collectors.toList());
12191219

1220+
@DataProvider
1221+
public Object[][] boolUnaryOpProvider() {
1222+
return BOOL_ARRAY_GENERATORS.stream().
1223+
map(f -> new Object[]{f}).
1224+
toArray(Object[][]::new);
1225+
}
12201226

12211227
static final List<List<IntFunction<double[]>>> DOUBLE_GENERATOR_TRIPLES =
12221228
DOUBLE_GENERATOR_PAIRS.stream().

test/jdk/jdk/incubator/vector/Double256VectorTests.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,12 @@ static long bits(double e) {
12171217
flatMap(fa -> DOUBLE_GENERATORS.stream().skip(1).map(fb -> List.of(fa, fb))).
12181218
collect(Collectors.toList());
12191219

1220+
@DataProvider
1221+
public Object[][] boolUnaryOpProvider() {
1222+
return BOOL_ARRAY_GENERATORS.stream().
1223+
map(f -> new Object[]{f}).
1224+
toArray(Object[][]::new);
1225+
}
12201226

12211227
static final List<List<IntFunction<double[]>>> DOUBLE_GENERATOR_TRIPLES =
12221228
DOUBLE_GENERATOR_PAIRS.stream().

test/jdk/jdk/incubator/vector/Double512VectorTests.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,12 @@ static long bits(double e) {
12171217
flatMap(fa -> DOUBLE_GENERATORS.stream().skip(1).map(fb -> List.of(fa, fb))).
12181218
collect(Collectors.toList());
12191219

1220+
@DataProvider
1221+
public Object[][] boolUnaryOpProvider() {
1222+
return BOOL_ARRAY_GENERATORS.stream().
1223+
map(f -> new Object[]{f}).
1224+
toArray(Object[][]::new);
1225+
}
12201226

12211227
static final List<List<IntFunction<double[]>>> DOUBLE_GENERATOR_TRIPLES =
12221228
DOUBLE_GENERATOR_PAIRS.stream().

test/jdk/jdk/incubator/vector/Double64VectorTests.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,12 @@ static long bits(double e) {
12171217
flatMap(fa -> DOUBLE_GENERATORS.stream().skip(1).map(fb -> List.of(fa, fb))).
12181218
collect(Collectors.toList());
12191219

1220+
@DataProvider
1221+
public Object[][] boolUnaryOpProvider() {
1222+
return BOOL_ARRAY_GENERATORS.stream().
1223+
map(f -> new Object[]{f}).
1224+
toArray(Object[][]::new);
1225+
}
12201226

12211227
static final List<List<IntFunction<double[]>>> DOUBLE_GENERATOR_TRIPLES =
12221228
DOUBLE_GENERATOR_PAIRS.stream().

0 commit comments

Comments
 (0)