Add a testcase that checks that we generate functions with frame