blob: 4b423699501829d57a608d1098068b18015cb5de [file] [log] [blame]
package groovy
/**
* Tests Closures in Groovy
*
* @author <a href="mailto:james@coredevelopers.net">James Strachan</a>
* @version $Revision$
*/
class ClosureAsParamTest extends GroovyTestCase {
void testSimpleBlockCall() {
assertClosure({owner-> println(owner) })
}
def assertClosure(Closure block) {
assert block != null
block.call("hello!")
}
}