test a simple code generation for ast