compilabletestsupport.groovy
来自「大名鼎鼎的java动态脚本语言。已经通过了sun的认证」· GROOVY 代码 · 共 17 行
GROOVY
17 行
package gls.scopeimport org.codehaus.groovy.control.CompilationFailedException;import groovy.util.GroovyTestCase;public class CompilableTestSupport extends GroovyTestCase { protected void shouldNotCompile(String script) { try { GroovyShell shell = new GroovyShell() shell.parse(script, getTestClassName()) } catch (CompilationFailedException cfe) { assert true return } fail("the compilation succeeded but should have failed") }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?