summaryrefslogtreecommitdiffstats
path: root/tests/component/edify_test.cpp
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2016-10-05 08:07:56 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-10-05 08:07:56 +0200
commit881063477374749b37134e0559e09e9cb39a050e (patch)
tree64a8c1e78aa282460aebf39d3f4147d00ffa0fcc /tests/component/edify_test.cpp
parentMerge "recovery: drop log/logger.h" (diff)
parentedify: Move State.script and State.errmsg to std::string. (diff)
downloadandroid_bootable_recovery-881063477374749b37134e0559e09e9cb39a050e.tar
android_bootable_recovery-881063477374749b37134e0559e09e9cb39a050e.tar.gz
android_bootable_recovery-881063477374749b37134e0559e09e9cb39a050e.tar.bz2
android_bootable_recovery-881063477374749b37134e0559e09e9cb39a050e.tar.lz
android_bootable_recovery-881063477374749b37134e0559e09e9cb39a050e.tar.xz
android_bootable_recovery-881063477374749b37134e0559e09e9cb39a050e.tar.zst
android_bootable_recovery-881063477374749b37134e0559e09e9cb39a050e.zip
Diffstat (limited to 'tests/component/edify_test.cpp')
-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);
}