summaryrefslogtreecommitdiffstats
path: root/tests/component/edify_test.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-10-05 08:13:22 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-10-05 08:13:22 +0200
commit6674f22a2f979ad71933d353f37743c4987c8d00 (patch)
tree64a8c1e78aa282460aebf39d3f4147d00ffa0fcc /tests/component/edify_test.cpp
parentMerge "recovery: drop log/logger.h" (diff)
parentMerge "edify: Move State.script and State.errmsg to std::string." (diff)
downloadandroid_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.cpp7
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);
}