compile closure in closure test and run it