Browse files

Move static compilation tests from @Mixin to trait

  • Loading branch information...
1 parent a765121 commit 0c9e914fd3033eef3060e2090a63f4c694c5b5b6 @melix committed Mar 28, 2014
Showing with 73 additions and 300 deletions.
  1. +3 −0 src/test/groovy/transform/stc/StaticTypeCheckingTestCase.groovy
  2. +1 −10 src/test/org/codehaus/groovy/classgen/asm/sc/AnonymousInnerClassStaticCompileTest.groovy
  3. +1 −8 src/test/org/codehaus/groovy/classgen/asm/sc/ArraysAndCollectionsStaticCompileTest.groovy
  4. +1 −10 src/test/org/codehaus/groovy/classgen/asm/sc/AssignmentsStaticCompileTest.groovy
  5. +1 −8 src/test/org/codehaus/groovy/classgen/asm/sc/BugsStaticCompileTest.groovy
  6. +1 −10 src/test/org/codehaus/groovy/classgen/asm/sc/ClosureParamTypeInferrenceStaticCompileTest.groovy
  7. +1 −8 src/test/org/codehaus/groovy/classgen/asm/sc/ClosuresStaticCompileTest.groovy
  8. +1 −7 src/test/org/codehaus/groovy/classgen/asm/sc/CompatWithASTXFormStaticCompileTest.groovy
  9. +1 −8 src/test/org/codehaus/groovy/classgen/asm/sc/CompileDynamicTest.groovy
  10. +1 −9 src/test/org/codehaus/groovy/classgen/asm/sc/DelegatesToStaticCompileTest.groovy
  11. +2 −8 src/test/org/codehaus/groovy/classgen/asm/sc/FieldsAndPropertiesStaticCompileTest.groovy
  12. +1 −8 src/test/org/codehaus/groovy/classgen/asm/sc/GenericsStaticCompileTest.groovy
  13. +1 −8 src/test/org/codehaus/groovy/classgen/asm/sc/IOGMClosureParamTypeInferrenceStaticCompileTest.groovy
  14. +1 −9 src/test/org/codehaus/groovy/classgen/asm/sc/LoopsStaticCompileTest.groovy
  15. +1 −7 src/test/org/codehaus/groovy/classgen/asm/sc/MethodCallsStaticCompilationTest.groovy
  16. +1 −8 src/test/org/codehaus/groovy/classgen/asm/sc/MiscStaticCompileTest.groovy
  17. +1 −3 src/test/org/codehaus/groovy/classgen/asm/sc/MixedModeStaticCompilationTest.groovy
  18. +1 −8 src/test/org/codehaus/groovy/classgen/asm/sc/NaryExpressionTestStaticCompileTest.groovy
  19. +1 −8 src/test/org/codehaus/groovy/classgen/asm/sc/RangesStaticCompileTest.groovy
  20. +1 −8 .../org/codehaus/groovy/classgen/asm/sc/ResourceGMClosureParamTypeInferrenceStaticCompileTest.groovy
  21. +1 −8 src/test/org/codehaus/groovy/classgen/asm/sc/ReturnsStaticCompileTest.groovy
  22. +1 −8 ...st/org/codehaus/groovy/classgen/asm/sc/SocketGMClosureParamTypeInferrenceStaticCompileTest.groovy
  23. +33 −17 src/test/org/codehaus/groovy/classgen/asm/sc/StaticCompilationTestSupport.groovy
  24. +1 −8 src/test/org/codehaus/groovy/classgen/asm/sc/StaticCompileConstructorsTest.groovy
  25. +1 −8 src/test/org/codehaus/groovy/classgen/asm/sc/StaticCompileDGMTest.groovy
  26. +1 −8 ...st/org/codehaus/groovy/classgen/asm/sc/StringGMClosureParamTypeInferrenceStaticCompileTest.groovy
  27. +1 −8 src/test/org/codehaus/groovy/classgen/asm/sc/TypeCheckingModeStaticCompileTest.groovy
  28. +1 −8 src/test/org/codehaus/groovy/classgen/asm/sc/TypeInferenceStaticCompileTest.groovy
  29. +1 −8 src/test/org/codehaus/groovy/classgen/asm/sc/UnaryOperatorStaticCompileTest.groovy
  30. +1 −7 src/test/org/codehaus/groovy/classgen/asm/sc/WithStaticCompileTest.groovy
  31. +1 −7 src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy6411Bug.groovy
  32. +1 −9 src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy6475Bug.groovy
  33. +1 −7 src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy6533Bug.groovy
  34. +1 −7 src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy6541Bug.groovy
  35. +1 −7 src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy6558Bug.groovy
  36. +1 −7 src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy6564Bug.groovy
  37. +1 −8 src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy6568Bug.groovy
  38. +1 −7 src/test/org/codehaus/groovy/classgen/asm/sc/vm6/MethodCallsStaticCompilationTest.groovy
View
3 src/test/groovy/transform/stc/StaticTypeCheckingTestCase.groovy
@@ -46,8 +46,11 @@ abstract class StaticTypeCheckingTestCase extends GroovyTestCase {
config.addCompilationCustomizers(new ASTTransformationCustomizer(TypeChecked), imports)
configure()
shell = new GroovyShell(config)
+ extraSetup()
}
+ protected void extraSetup() {}
+
protected void configure() {}
@Override
View
11 src/test/org/codehaus/groovy/classgen/asm/sc/AnonymousInnerClassStaticCompileTest.groovy
@@ -23,14 +23,5 @@ import groovy.transform.stc.AnonymousInnerClassSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class AnonymousInnerClassStaticCompileTest extends AnonymousInnerClassSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
-
-}
+class AnonymousInnerClassStaticCompileTest extends AnonymousInnerClassSTCTest implements StaticCompilationTestSupport {}
View
9 src/test/org/codehaus/groovy/classgen/asm/sc/ArraysAndCollectionsStaticCompileTest.groovy
@@ -22,14 +22,7 @@ import groovy.transform.stc.ArraysAndCollectionsSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class ArraysAndCollectionsStaticCompileTest extends ArraysAndCollectionsSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class ArraysAndCollectionsStaticCompileTest extends ArraysAndCollectionsSTCTest implements StaticCompilationTestSupport {
void testListStarWithMethodReturningVoid() {
assertScript '''
View
11 src/test/org/codehaus/groovy/classgen/asm/sc/AssignmentsStaticCompileTest.groovy
@@ -22,14 +22,5 @@ import groovy.transform.stc.STCAssignmentTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class AssignmentsStaticCompileTest extends STCAssignmentTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
-
-}
+class AssignmentsStaticCompileTest extends STCAssignmentTest implements StaticCompilationTestSupport {}
View
9 src/test/org/codehaus/groovy/classgen/asm/sc/BugsStaticCompileTest.groovy
@@ -22,14 +22,7 @@ import groovy.transform.stc.BugsSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class BugsStaticCompileTest extends BugsSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class BugsStaticCompileTest extends BugsSTCTest implements StaticCompilationTestSupport {
void testGroovy5498PropertyAccess() {
assertScript '''
View
11 ...st/org/codehaus/groovy/classgen/asm/sc/ClosureParamTypeInferrenceStaticCompileTest.groovy
@@ -22,14 +22,5 @@ import groovy.transform.stc.ClosureParamTypeInferenceSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class ClosureParamTypeInferrenceStaticCompileTest extends ClosureParamTypeInferenceSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
-
-}
+class ClosureParamTypeInferrenceStaticCompileTest extends ClosureParamTypeInferenceSTCTest implements StaticCompilationTestSupport { }
View
9 src/test/org/codehaus/groovy/classgen/asm/sc/ClosuresStaticCompileTest.groovy
@@ -22,14 +22,7 @@ import groovy.transform.stc.ClosuresSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class ClosuresStaticCompileTest extends ClosuresSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class ClosuresStaticCompileTest extends ClosuresSTCTest implements StaticCompilationTestSupport {
// GROOVY-5584
void testEachOnMapClosure() {
View
8 src/test/org/codehaus/groovy/classgen/asm/sc/CompatWithASTXFormStaticCompileTest.groovy
@@ -24,13 +24,7 @@ import groovy.transform.stc.StaticTypeCheckingTestCase
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class CompatWithASTXFormStaticCompileTest extends StaticTypeCheckingTestCase {
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class CompatWithASTXFormStaticCompileTest extends StaticTypeCheckingTestCase implements StaticCompilationTestSupport {
void testShouldNotThrowArrayIndexOutOfBoundsError() {
assertScript '''import groovy.transform.Immutable
View
9 src/test/org/codehaus/groovy/classgen/asm/sc/CompileDynamicTest.groovy
@@ -21,14 +21,7 @@ import groovy.transform.stc.StaticTypeCheckingTestCase
/**
* Test case for {@link groovy.transform.CompileDynamic}.
*/
-@Mixin(StaticCompilationTestSupport)
-
-class CompileDynamicTest extends StaticTypeCheckingTestCase {
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class CompileDynamicTest extends StaticTypeCheckingTestCase implements StaticCompilationTestSupport {
void testCompileDynamic() {
assertScript '''import groovy.transform.CompileDynamic
View
10 src/test/org/codehaus/groovy/classgen/asm/sc/DelegatesToStaticCompileTest.groovy
@@ -24,13 +24,5 @@ import groovy.transform.stc.DelegatesToSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class DelegatesToStaticCompileTest extends DelegatesToSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
-
+class DelegatesToStaticCompileTest extends DelegatesToSTCTest implements StaticCompilationTestSupport {
}
View
10 src/test/org/codehaus/groovy/classgen/asm/sc/FieldsAndPropertiesStaticCompileTest.groovy
@@ -17,14 +17,8 @@ package org.codehaus.groovy.classgen.asm.sc
import groovy.transform.stc.FieldsAndPropertiesSTCTest
-@Mixin(StaticCompilationTestSupport)
-class FieldsAndPropertiesStaticCompileTest extends FieldsAndPropertiesSTCTest {
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
-
+class FieldsAndPropertiesStaticCompileTest extends FieldsAndPropertiesSTCTest implements StaticCompilationTestSupport{
+
void testMapGetAt() {
assertScript '''
Map map = [a: 1, b:2]
View
9 src/test/org/codehaus/groovy/classgen/asm/sc/GenericsStaticCompileTest.groovy
@@ -22,14 +22,7 @@ import groovy.transform.stc.GenericsSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class GenericsStaticCompileTest extends GenericsSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class GenericsStaticCompileTest extends GenericsSTCTest implements StaticCompilationTestSupport {
}
View
9 ...rg/codehaus/groovy/classgen/asm/sc/IOGMClosureParamTypeInferrenceStaticCompileTest.groovy
@@ -26,14 +26,7 @@ import groovy.transform.stc.IOGMClosureParamTypeInferenceSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class IOGMClosureParamTypeInferrenceStaticCompileTest extends IOGMClosureParamTypeInferenceSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class IOGMClosureParamTypeInferrenceStaticCompileTest extends IOGMClosureParamTypeInferenceSTCTest implements StaticCompilationTestSupport {
}
View
10 src/test/org/codehaus/groovy/classgen/asm/sc/LoopsStaticCompileTest.groovy
@@ -22,14 +22,6 @@ import groovy.transform.stc.LoopsSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class LoopsStaticCompileTest extends LoopsSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
-
+class LoopsStaticCompileTest extends LoopsSTCTest implements StaticCompilationTestSupport {
}
View
8 src/test/org/codehaus/groovy/classgen/asm/sc/MethodCallsStaticCompilationTest.groovy
@@ -18,13 +18,7 @@ package org.codehaus.groovy.classgen.asm.sc;
import groovy.transform.stc.MethodCallsSTCTest
import org.codehaus.groovy.control.MultipleCompilationErrorsException
-@Mixin(StaticCompilationTestSupport)
-public class MethodCallsStaticCompilationTest extends MethodCallsSTCTest {
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+public class MethodCallsStaticCompilationTest extends MethodCallsSTCTest implements StaticCompilationTestSupport {
void testCallToSuper() {
assertScript '''
View
9 src/test/org/codehaus/groovy/classgen/asm/sc/MiscStaticCompileTest.groovy
@@ -22,14 +22,7 @@ import groovy.transform.stc.MiscSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class MiscStaticCompileTest extends MiscSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class MiscStaticCompileTest extends MiscSTCTest implements StaticCompilationTestSupport {
void testEachFileRecurse() {
assertScript '''import groovy.io.FileType
View
4 src/test/org/codehaus/groovy/classgen/asm/sc/MixedModeStaticCompilationTest.groovy
@@ -19,12 +19,10 @@ package org.codehaus.groovy.classgen.asm.sc
import groovy.transform.stc.StaticTypeCheckingTestCase
import org.codehaus.groovy.control.customizers.ASTTransformationCustomizer
-@Mixin(StaticCompilationTestSupport)
-class MixedModeStaticCompilationTest extends StaticTypeCheckingTestCase {
+class MixedModeStaticCompilationTest extends StaticTypeCheckingTestCase implements StaticCompilationTestSupport {
@Override
protected void setUp() {
super.setUp()
- extraSetup()
removeCustomizer()
}
View
9 src/test/org/codehaus/groovy/classgen/asm/sc/NaryExpressionTestStaticCompileTest.groovy
@@ -22,14 +22,7 @@ import groovy.transform.stc.STCnAryExpressionTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class NaryExpressionTestStaticCompileTest extends STCnAryExpressionTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class NaryExpressionTestStaticCompileTest extends STCnAryExpressionTest implements StaticCompilationTestSupport {
}
View
9 src/test/org/codehaus/groovy/classgen/asm/sc/RangesStaticCompileTest.groovy
@@ -22,14 +22,7 @@ import groovy.transform.stc.RangesSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class RangesStaticCompileTest extends RangesSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class RangesStaticCompileTest extends RangesSTCTest implements StaticCompilationTestSupport {
// GROOVY-6482
void testShouldReturnAnEmptyList() {
View
9 ...ehaus/groovy/classgen/asm/sc/ResourceGMClosureParamTypeInferrenceStaticCompileTest.groovy
@@ -23,14 +23,7 @@ import groovy.transform.stc.ResourceGMClosureParamTypeInferenceSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class ResourceGMClosureParamTypeInferrenceStaticCompileTest extends ResourceGMClosureParamTypeInferenceSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class ResourceGMClosureParamTypeInferrenceStaticCompileTest extends ResourceGMClosureParamTypeInferenceSTCTest implements StaticCompilationTestSupport {
}
View
9 src/test/org/codehaus/groovy/classgen/asm/sc/ReturnsStaticCompileTest.groovy
@@ -22,14 +22,7 @@ import groovy.transform.stc.ReturnsSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class ReturnsStaticCompileTest extends ReturnsSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class ReturnsStaticCompileTest extends ReturnsSTCTest implements StaticCompilationTestSupport {
void testReturnTypeInferenceWithInheritance() {
assertScript '''
View
9 ...odehaus/groovy/classgen/asm/sc/SocketGMClosureParamTypeInferrenceStaticCompileTest.groovy
@@ -23,14 +23,7 @@ import groovy.transform.stc.SocketGMClosureParamTypeInferenceSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class SocketGMClosureParamTypeInferrenceStaticCompileTest extends SocketGMClosureParamTypeInferenceSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class SocketGMClosureParamTypeInferrenceStaticCompileTest extends SocketGMClosureParamTypeInferenceSTCTest implements StaticCompilationTestSupport {
}
View
50 src/test/org/codehaus/groovy/classgen/asm/sc/StaticCompilationTestSupport.groovy
@@ -15,6 +15,8 @@
*/
package org.codehaus.groovy.classgen.asm.sc
+import groovy.transform.InheritConstructors
+import groovy.transform.Trait
import org.codehaus.groovy.control.CompilerConfiguration
import org.codehaus.groovy.control.customizers.ASTTransformationCustomizer
import groovy.transform.CompileStatic
@@ -42,14 +44,14 @@ import org.codehaus.groovy.tools.GroovyClass
*
* @author Cedric Champeau
*/
+@Trait
class StaticCompilationTestSupport {
Map<String, Object[]> astTrees
CustomCompilationUnit compilationUnit
void extraSetup() {
astTrees = [:]
- def mixed = metaClass.owner
- mixed.config = new CompilerConfiguration()
+ config = new CompilerConfiguration()
def imports = new ImportCustomizer()
imports.addImports(
'groovy.transform.ASTTest', 'org.codehaus.groovy.transform.stc.StaticTypesMarker',
@@ -58,37 +60,51 @@ class StaticCompilationTestSupport {
imports.addStaticStars('org.codehaus.groovy.control.CompilePhase')
imports.addStaticStars('org.codehaus.groovy.transform.stc.StaticTypesMarker')
imports.addStaticStars('org.codehaus.groovy.ast.ClassHelper')
- mixed.config.addCompilationCustomizers(imports,new ASTTransformationCustomizer(CompileStatic), new ASTTreeCollector())
- mixed.configure()
- mixed.shell = new GroovyShell(mixed.config)
+ config.addCompilationCustomizers(imports,new ASTTransformationCustomizer(CompileStatic), new ASTTreeCollector(this))
+ configure()
+ shell = new GroovyShell(config)
// trick because GroovyShell doesn't allow to provide our own GroovyClassLoader
// to be fixed when this will be possible
- mixed.shell.loader = new GroovyClassLoader(this.class.classLoader, mixed.config) {
- @Override
- protected CompilationUnit createCompilationUnit(final CompilerConfiguration config, final CodeSource source) {
- def cu = new CustomCompilationUnit(config, source, this)
- setCompilationUnit(cu)
- return cu
- }
+ shell.loader = new CompilationUnitAwareGroovyClassLoader(this.getClass().classLoader, config, this)
+ }
+
+ public static class CompilationUnitAwareGroovyClassLoader extends GroovyClassLoader {
+ StaticCompilationTestSupport testCase
+
+ CompilationUnitAwareGroovyClassLoader(
+ final ClassLoader loader,
+ final CompilerConfiguration config,
+ final StaticCompilationTestSupport testCase) {
+ super(loader, config)
+ this.testCase = testCase
+ }
+
+ @Override
+ protected CompilationUnit createCompilationUnit(final CompilerConfiguration config, final CodeSource source) {
+ def cu = new CustomCompilationUnit(config, source, this)
+ testCase.compilationUnit = cu
+ return cu
}
}
- private class CustomCompilationUnit extends CompilationUnit {
+ public static class CustomCompilationUnit extends CompilationUnit {
CustomCompilationUnit(final CompilerConfiguration configuration, final CodeSource security, final GroovyClassLoader loader) {
super(configuration, security, loader)
}
}
- private class ASTTreeCollector extends CompilationCustomizer {
+ public static class ASTTreeCollector extends CompilationCustomizer {
+ StaticCompilationTestSupport testCase
- ASTTreeCollector() {
+ ASTTreeCollector(StaticCompilationTestSupport testCase) {
super(CompilePhase.CLASS_GENERATION)
+ this.testCase = testCase
}
@Override
void call(final org.codehaus.groovy.control.SourceUnit source, final org.codehaus.groovy.classgen.GeneratorContext context, final ClassNode classNode) {
- def unit = getCompilationUnit()
+ def unit = testCase.compilationUnit
if (!unit) return
List<GroovyClass> classes = unit.generatedClasses
classes.each { GroovyClass groovyClass ->
@@ -100,7 +116,7 @@ class StaticCompilationTestSupport {
// not a problem
e.printStackTrace(new PrintWriter(stringWriter))
}
- getAstTrees()[groovyClass.name] = [classNode, stringWriter.toString()] as Object[]
+ testCase.astTrees[groovyClass.name] = [classNode, stringWriter.toString()] as Object[]
}
}
}
View
9 src/test/org/codehaus/groovy/classgen/asm/sc/StaticCompileConstructorsTest.groovy
@@ -22,14 +22,7 @@ import groovy.transform.stc.ConstructorsSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class StaticCompileConstructorsTest extends ConstructorsSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class StaticCompileConstructorsTest extends ConstructorsSTCTest implements StaticCompilationTestSupport {
void testMapConstructorError() {
assertScript '''import groovy.transform.Canonical
View
9 src/test/org/codehaus/groovy/classgen/asm/sc/StaticCompileDGMTest.groovy
@@ -22,14 +22,7 @@ import groovy.transform.stc.DefaultGroovyMethodsSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class StaticCompileDGMTest extends DefaultGroovyMethodsSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class StaticCompileDGMTest extends DefaultGroovyMethodsSTCTest implements StaticCompilationTestSupport {
void testThreadDotStart() {
assertScript '''
View
9 ...odehaus/groovy/classgen/asm/sc/StringGMClosureParamTypeInferrenceStaticCompileTest.groovy
@@ -24,14 +24,7 @@ import groovy.transform.stc.StringGMClosureParamTypeInferenceSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class StringGMClosureParamTypeInferrenceStaticCompileTest extends StringGMClosureParamTypeInferenceSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class StringGMClosureParamTypeInferrenceStaticCompileTest extends StringGMClosureParamTypeInferenceSTCTest implements StaticCompilationTestSupport {
}
View
9 src/test/org/codehaus/groovy/classgen/asm/sc/TypeCheckingModeStaticCompileTest.groovy
@@ -22,14 +22,7 @@ import groovy.transform.stc.TypeCheckingModeTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class TypeCheckingModeStaticCompileTest extends TypeCheckingModeTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class TypeCheckingModeStaticCompileTest extends TypeCheckingModeTest implements StaticCompilationTestSupport {
void testEnsureBytecodeIsDifferentWhenSkipped() {
assertScript '''
View
9 src/test/org/codehaus/groovy/classgen/asm/sc/TypeInferenceStaticCompileTest.groovy
@@ -22,14 +22,7 @@ import groovy.transform.stc.TypeInferenceSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class TypeInferenceStaticCompileTest extends TypeInferenceSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class TypeInferenceStaticCompileTest extends TypeInferenceSTCTest implements StaticCompilationTestSupport {
// GROOVY-5655
void testByteArrayInference() {
View
9 src/test/org/codehaus/groovy/classgen/asm/sc/UnaryOperatorStaticCompileTest.groovy
@@ -22,14 +22,7 @@ import groovy.transform.stc.UnaryOperatorSTCTest
*
* @author Cedric Champeau
*/
-@Mixin(StaticCompilationTestSupport)
-class UnaryOperatorStaticCompileTest extends UnaryOperatorSTCTest {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class UnaryOperatorStaticCompileTest extends UnaryOperatorSTCTest implements StaticCompilationTestSupport {
}
View
8 src/test/org/codehaus/groovy/classgen/asm/sc/WithStaticCompileTest.groovy
@@ -22,13 +22,7 @@ import groovy.transform.stc.WithSTCTest
*
* @author Andre Steingress
*/
-@Mixin(StaticCompilationTestSupport)
-class WithStaticCompileTest extends WithSTCTest {
+class WithStaticCompileTest extends WithSTCTest implements StaticCompilationTestSupport {
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
}
View
8 src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy6411Bug.groovy
@@ -3,13 +3,7 @@ package org.codehaus.groovy.classgen.asm.sc.bugs
import groovy.transform.stc.StaticTypeCheckingTestCase
import org.codehaus.groovy.classgen.asm.sc.StaticCompilationTestSupport
-@Mixin(StaticCompilationTestSupport)
-class Groovy6411Bug extends StaticTypeCheckingTestCase {
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class Groovy6411Bug extends StaticTypeCheckingTestCase implements StaticCompilationTestSupport {
void testShouldNotThrowInvokerInvocationException() {
assertScript '''
View
10 src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy6475Bug.groovy
@@ -21,15 +21,7 @@ package org.codehaus.groovy.classgen.asm.sc.bugs
import groovy.transform.stc.StaticTypeCheckingTestCase
import org.codehaus.groovy.classgen.asm.sc.StaticCompilationTestSupport
-@Mixin(StaticCompilationTestSupport)
-class Groovy6475Bug extends StaticTypeCheckingTestCase {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
-
+class Groovy6475Bug extends StaticTypeCheckingTestCase implements StaticCompilationTestSupport {
void testShouldNotSayThatDiamondIsInUse() {
assertScript '''import org.codehaus.groovy.classgen.asm.sc.bugs.Groovy6475Bug.TypeReference
View
8 src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy6533Bug.groovy
@@ -19,13 +19,7 @@ package org.codehaus.groovy.classgen.asm.sc.bugs
import groovy.transform.stc.StaticTypeCheckingTestCase
import org.codehaus.groovy.classgen.asm.sc.StaticCompilationTestSupport
-@Mixin(StaticCompilationTestSupport)
-class Groovy6533Bug extends StaticTypeCheckingTestCase {
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class Groovy6533Bug extends StaticTypeCheckingTestCase implements StaticCompilationTestSupport {
void testSelectedMethodShouldBeTheSameWithAndWithoutWildcard() {
assertScript '''
View
8 src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy6541Bug.groovy
@@ -21,13 +21,7 @@ package org.codehaus.groovy.classgen.asm.sc.bugs
import groovy.transform.stc.StaticTypeCheckingTestCase
import org.codehaus.groovy.classgen.asm.sc.StaticCompilationTestSupport
-@Mixin(StaticCompilationTestSupport)
-class Groovy6541Bug extends StaticTypeCheckingTestCase {
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class Groovy6541Bug extends StaticTypeCheckingTestCase implements StaticCompilationTestSupport {
void testShouldCompileGetAtWithBoxedInteger() {
assertScript '''class Foo {
View
8 src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy6558Bug.groovy
@@ -19,13 +19,7 @@ package org.codehaus.groovy.classgen.asm.sc.bugs
import groovy.transform.stc.StaticTypeCheckingTestCase
import org.codehaus.groovy.classgen.asm.sc.StaticCompilationTestSupport
-@Mixin(StaticCompilationTestSupport)
-class Groovy6558Bug extends StaticTypeCheckingTestCase {
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class Groovy6558Bug extends StaticTypeCheckingTestCase implements StaticCompilationTestSupport {
void testShouldCompilePostfixPlusOnMap() {
assertScript '''
View
8 src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy6564Bug.groovy
@@ -23,13 +23,7 @@ package org.codehaus.groovy.classgen.asm.sc.bugs
import groovy.transform.stc.StaticTypeCheckingTestCase
import org.codehaus.groovy.classgen.asm.sc.StaticCompilationTestSupport
-@Mixin(StaticCompilationTestSupport)
-class Groovy6564Bug extends StaticTypeCheckingTestCase {
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class Groovy6564Bug extends StaticTypeCheckingTestCase implements StaticCompilationTestSupport {
void testShouldNotRequireIntermediateVariableToPass() {
assertScript '''class Stream<T> implements Iterable<T> {
View
9 src/test/org/codehaus/groovy/classgen/asm/sc/bugs/Groovy6568Bug.groovy
@@ -19,14 +19,7 @@ package org.codehaus.groovy.classgen.asm.sc.bugs
import groovy.transform.stc.StaticTypeCheckingTestCase
import org.codehaus.groovy.classgen.asm.sc.StaticCompilationTestSupport
-@Mixin(StaticCompilationTestSupport)
-class Groovy6568Bug extends StaticTypeCheckingTestCase {
-
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+class Groovy6568Bug extends StaticTypeCheckingTestCase implements StaticCompilationTestSupport {
void testShouldNotThrowVerifyErrorIfUsingImplicitCall() {
assertScript '''
View
8 src/test/org/codehaus/groovy/classgen/asm/sc/vm6/MethodCallsStaticCompilationTest.groovy
@@ -18,11 +18,5 @@ package org.codehaus.groovy.classgen.asm.sc.vm6
import groovy.transform.stc.vm6.MethodCallsSTCTest
import org.codehaus.groovy.classgen.asm.sc.StaticCompilationTestSupport
-@Mixin(StaticCompilationTestSupport)
-public class MethodCallsStaticCompilationTest extends MethodCallsSTCTest {
- @Override
- protected void setUp() {
- super.setUp()
- extraSetup()
- }
+public class MethodCallsStaticCompilationTest extends MethodCallsSTCTest implements StaticCompilationTestSupport {
}

0 comments on commit 0c9e914

Please sign in to comment.