diff --git a/nemu/tests/expr_test.c b/nemu/tests/expr_test.c index a31dd8f..0da2996 100644 --- a/nemu/tests/expr_test.c +++ b/nemu/tests/expr_test.c @@ -177,8 +177,8 @@ START_TEST(test_expr_plain_register) { gpr(i) = i; yy_scan_string(buf); result = yyparse(&value); - ck_assert_msg(result == 0, "expr = %s\n", buf); yylex_destroy(); + ck_assert_msg(result == 0, "expr = %s\n", buf); ck_assert(value == i); for (j = 1; j < 10; j++) {