Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ValueTypeTests.testDefaultValueWithNonValueType #20473

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
hangshao0 marked this conversation as resolved.
Show resolved Hide resolved
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