3 import org
.codehaus
.groovy
.control
.CompilationFailedException
;
4 import groovy
.util
.GroovyTestCase
;
6 public class CompilableTestSupport
extends GroovyTestCase
{
7 protected void shouldNotCompile(String script
) {
9 GroovyClassLoader gcl
= new GroovyClassLoader()
10 gcl
.parseClass(script
, getTestClassName())
11 } catch (CompilationFailedException cfe
) {
15 fail("the compilation succeeded but should have failed")
18 protected void shouldCompile(String script
) {
19 GroovyClassLoader gcl
= new GroovyClassLoader()
20 gcl
.parseClass(script
, getTestClassName())