diff options
author | Tao Bao <tbao@google.com> | 2016-10-05 08:13:22 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-10-05 08:13:22 +0200 |
commit | 6674f22a2f979ad71933d353f37743c4987c8d00 (patch) | |
tree | 64a8c1e78aa282460aebf39d3f4147d00ffa0fcc /tests/component/edify_test.cpp | |
parent | Merge "recovery: drop log/logger.h" (diff) | |
parent | Merge "edify: Move State.script and State.errmsg to std::string." (diff) | |
download | android_bootable_recovery-6674f22a2f979ad71933d353f37743c4987c8d00.tar android_bootable_recovery-6674f22a2f979ad71933d353f37743c4987c8d00.tar.gz android_bootable_recovery-6674f22a2f979ad71933d353f37743c4987c8d00.tar.bz2 android_bootable_recovery-6674f22a2f979ad71933d353f37743c4987c8d00.tar.lz android_bootable_recovery-6674f22a2f979ad71933d353f37743c4987c8d00.tar.xz android_bootable_recovery-6674f22a2f979ad71933d353f37743c4987c8d00.tar.zst android_bootable_recovery-6674f22a2f979ad71933d353f37743c4987c8d00.zip |
Diffstat (limited to '')
-rw-r--r-- | tests/component/edify_test.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/component/edify_test.cpp b/tests/component/edify_test.cpp index ded8540a0..ede2ecb0a 100644 --- a/tests/component/edify_test.cpp +++ b/tests/component/edify_test.cpp @@ -25,10 +25,7 @@ static void expect(const char* expr_str, const char* expected) { int error_count; EXPECT_EQ(parse_string(expr_str, &e, &error_count), 0); - State state; - state.cookie = nullptr; - state.errmsg = nullptr; - state.script = strdup(expr_str); + State state(expr_str, nullptr); char* result = Evaluate(&state, e); @@ -38,8 +35,6 @@ static void expect(const char* expr_str, const char* expected) { EXPECT_STREQ(result, expected); } - free(state.errmsg); - free(state.script); free(result); } |