blob: 76718e878b7c4c092d0d72ee9817cf980e0f3ad6 [file] [log] [blame]
import java.util.Arrays
class ThrowTest extends GroovyTestCase {
void testThrow() {
try {
throw new Exception("abcd")
fail("Should have thrown an exception by now")
}
catch (Exception e) {
assert e.message == "abcd"
println("Caught exception ${e}")
}
}
}