Skip to content

Commit

Permalink
fix some tests for JDK7
Browse files Browse the repository at this point in the history
  • Loading branch information
paulk-asert committed Jul 27, 2023
1 parent 3e7da58 commit e49e7be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/test/groovy/bugs/Groovy8815.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package groovy.bugs

import groovy.test.GroovyAssert
import org.codehaus.groovy.control.CompilerConfiguration
import org.codehaus.groovy.tools.javac.JavaAwareCompilationUnit
import org.junit.Test
Expand All @@ -26,6 +27,8 @@ final class Groovy8815 {

@Test
void testGenerics() {
if (!GroovyAssert.isAtLeastJdk('1.8')) return

def config = new CompilerConfiguration(
targetDirectory: File.createTempDir(),
jointCompilationOptions: [stubDir: File.createTempDir()]
Expand Down
2 changes: 2 additions & 0 deletions src/test/groovy/transform/stc/GenericsSTCTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2621,6 +2621,8 @@ class GenericsSTCTest extends StaticTypeCheckingTestCase {

// GROOVY-10648
void testShouldUseMethodGenericType16() {
if (!GroovyAssert.isAtLeastJdk('1.8')) return

assertScript '''
def <T extends Number> Set<T> test(Iterable<T> iterable) {
final Set<T> result = new HashSet<>()
Expand Down

0 comments on commit e49e7be

Please sign in to comment.