Added test code for cgen