Add tests for emit_assembly and emit_memory