Skip to content

Commit

Permalink
make non-indy test more lenient (both non and indy cases)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulk-asert committed Mar 3, 2024
1 parent 4b4a464 commit f89bb66
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ final class ImmutableTransformTest {

@Test
void testCloneableFieldNotCloneableObject() {
// attempting to access the protected clone() method is illegal from JDK16
def expectedException = isAtLeastJdk('16.0') ? IllegalAccessException : CloneNotSupportedException
// non-indy bytecode attempts to access the protected clone() method which is illegal from JDK16
def indy = System.getProperty('groovy.target.indy')
def expectedException = isAtLeastJdk('16.0') && !indy ? IllegalAccessException : CloneNotSupportedException
shouldFail expectedException, '''
import groovy.transform.*
class Dolly {
Expand Down

0 comments on commit f89bb66

Please sign in to comment.