tests/codegen: added tests