Skip to content

Commit a8b6035

Browse files
authored
Merge pull request #22650 from theresa-m/strictfield_4
Correct stack size for StrictField test
2 parents fea8da4 + 952ad1d commit a8b6035

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/functional/Valhalla/src/org/openj9/test/lworld/StrictFieldGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private static Class<?> generateTestPutStrictFinalField(String className, boolea
6262
mv.visitFieldInsn(PUTFIELD, className, fieldName, fieldDesc);
6363
}
6464
mv.visitInsn(RETURN);
65-
mv.visitMaxs(1, 1);
65+
mv.visitMaxs(lateLarval ? 2 : 1, 1);
6666
mv.visitEnd();
6767

6868
if (unrestricted) {

test/functional/Valhalla/src/org/openj9/test/lworld/StrictFieldTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class StrictFieldTests {
3232
/* A strict final field cannot be set outside earlyLarvel.
3333
* Test in <init> after invokespecial (lateLarval).
3434
*/
35-
@Test(expectedExceptions = VerifyError.class)
35+
@Test(expectedExceptions = VerifyError.class, expectedExceptionsMessageRegExp = ".*<init>.*JBputfield.*")
3636
static public void testPutStrictFinalFieldLateLarval() throws Throwable{
3737
Class<?> c = StrictFieldGenerator.generateTestPutStrictFinalFieldLateLarval();
3838
c.newInstance();
@@ -41,7 +41,7 @@ static public void testPutStrictFinalFieldLateLarval() throws Throwable{
4141
/* A strict final field cannot be set outside earlyLarvel.
4242
* Test outside of <init> (initialization state unrestricted).
4343
*/
44-
@Test(expectedExceptions = VerifyError.class)
44+
@Test(expectedExceptions = VerifyError.class, expectedExceptionsMessageRegExp = ".*putI.*JBputfield.*")
4545
static public void testPutStrictFinalFieldUnrestricted() throws Throwable {
4646
Class<?> c = StrictFieldGenerator.generateTestPutStrictFinalFieldUnrestricted();
4747
c.newInstance();

0 commit comments

Comments
 (0)