Skip to content

Commit

Permalink
Remove ValueTypeTests.testDefaultValueWithNonValueType
Browse files Browse the repository at this point in the history
ValueTypeTests.testDefaultValueWithNonValueType tests the same thing as ValhallaAttributeTests.testNullRestrictedFieldWhereImplicitCreationHasNoDefaultFlag

Signed-off-by: Theresa Mammarella <[email protected]>
  • Loading branch information
theresa-m committed Oct 31, 2024
1 parent f92435b commit 1458e62
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 1458e62

Please sign in to comment.