summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-10-04 03:06:46 +0200
committerTao Bao <tbao@google.com>2016-10-05 00:33:22 +0200
commit876b9391c084701b147af3b0d5c933d877bb6052 (patch)
tree603d90593492fb898a8f76824192aaa03630c614 /tests
parentMerge "recovery: drop log/logger.h" am: 38b923ff6c am: 7cf7e6ce4f am: 0467a905cc (diff)
downloadandroid_bootable_recovery-876b9391c084701b147af3b0d5c933d877bb6052.tar
android_bootable_recovery-876b9391c084701b147af3b0d5c933d877bb6052.tar.gz
android_bootable_recovery-876b9391c084701b147af3b0d5c933d877bb6052.tar.bz2
android_bootable_recovery-876b9391c084701b147af3b0d5c933d877bb6052.tar.lz
android_bootable_recovery-876b9391c084701b147af3b0d5c933d877bb6052.tar.xz
android_bootable_recovery-876b9391c084701b147af3b0d5c933d877bb6052.tar.zst
android_bootable_recovery-876b9391c084701b147af3b0d5c933d877bb6052.zip
Diffstat (limited to 'tests')
-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);
}