Formal test cases for closure conversion