Skip to content

Commit

Permalink
Merge pull request #20473 from theresa-m/disabled_valhalla_tests
Browse files Browse the repository at this point in the history
Remove ValueTypeTests.testDefaultValueWithNonValueType
  • Loading branch information
hangshao0 authored Nov 4, 2024
2 parents 006bdbc + d7e0ba5 commit 517905a
Showing 1 changed file with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -550,26 +550,6 @@ static public void testCreateArrayFlattenedLine2D() throws Throwable {
assertEquals(getX.invoke(getFlatEn.invoke(line2D_2_check)), getX.invoke(getFlatEn.invoke(line2D_2)));
assertEquals(getY.invoke(getFlatEn.invoke(line2D_1_check)), getY.invoke(getFlatEn.invoke(line2D_1)));
assertEquals(getY.invoke(getFlatEn.invoke(line2D_2_check)), getY.invoke(getFlatEn.invoke(line2D_2)));
}

/*
* Test defaultValue with ref type
*
* class DefaultValueWithNoneValueType {
* Object f1;
* Object f1;
* }
*
*/
@Test(enabled=false, priority=3)
static public void testDefaultValueWithNonValueType() throws Throwable {
String[] fields = {"f1:Ljava/lang/Object;:NR", "f2:Ljava/lang/Object;:NR"};
Class<?> defaultValueWithNonValueType = ValueTypeGenerator.generateRefClass("DefaultValueWithNonValueType", fields);
MethodHandle makeDefaultValueWithNonValueType = lookup.findStatic(defaultValueWithNonValueType, "makeDefaultValue", MethodType.methodType(Object.class));
try {
makeDefaultValueWithNonValueType.invoke();
Assert.fail("should throw error. Default value must be used with ValueType");
} catch (IncompatibleClassChangeError e) {}
}

@Test(priority=2, invocationCount=2)
Expand Down

0 comments on commit 517905a

Please sign in to comment.