Sign in
apache
/
groovy
/
refs/tags/GROOVY_1_1_BETA_3
/
.
/
groovy-core
/
src
/
test
/
groovy
/
ThrowTest.groovy
blob: c371c7367ace0d2c6e0ccd697d92af14e38733b7 [
file
] [
log
] [
blame
]
package
groovy
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}"
)
}
}
}