< prev index next >

test/jdk/valhalla/valuetypes/ValueArray.java

Print this page
rev 55127 : 8223351: [lworld] Primary mirror and nullable mirror for inline type
Reviewed-by: tbd

*** 71,82 **** @Test(dataProvider="arrayTypes") public static void test(Class<?> c, Object[] elements) { ValueArray test = new ValueArray(c, elements.length); test.run(elements); Class<?> compType = c.getComponentType(); ! if (compType.isValue()) { ! test.testSetNullElement(compType == compType.asBoxType()); } } @Test public static void testPointArray() { --- 71,82 ---- @Test(dataProvider="arrayTypes") public static void test(Class<?> c, Object[] elements) { ValueArray test = new ValueArray(c, elements.length); test.run(elements); Class<?> compType = c.getComponentType(); ! if (compType.isInlineClass()) { ! test.testSetNullElement(compType == compType.asNullableType()); } } @Test public static void testPointArray() {
*** 187,197 **** Arrays.setAll(array, i -> elements[i]); } void testSetNullElement(boolean nullable) { ! assert(array.getClass().getComponentType().isValue()); for (int i=0; i < array.length; i++) { try { Array.set(array, i, null); if (!nullable) throw new AssertionError("NPE not thrown"); --- 187,197 ---- Arrays.setAll(array, i -> elements[i]); } void testSetNullElement(boolean nullable) { ! assert(array.getClass().getComponentType().isInlineClass()); for (int i=0; i < array.length; i++) { try { Array.set(array, i, null); if (!nullable) throw new AssertionError("NPE not thrown");
< prev index next >