summaryrefslogtreecommitdiffstats
path: root/tests/component/edify_test.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-10-18 02:15:29 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-10-18 02:15:29 +0200
commit430b7ae4699eb3685dcc0f7c736a9aebd76829a8 (patch)
treee237b84e2e6f4cd6a562f88ab3e491eca8767e9f /tests/component/edify_test.cpp
parentMerge "init: move healthd to late-init" (diff)
parentMerge "Change StringValue to use std::string" (diff)
downloadandroid_bootable_recovery-430b7ae4699eb3685dcc0f7c736a9aebd76829a8.tar
android_bootable_recovery-430b7ae4699eb3685dcc0f7c736a9aebd76829a8.tar.gz
android_bootable_recovery-430b7ae4699eb3685dcc0f7c736a9aebd76829a8.tar.bz2
android_bootable_recovery-430b7ae4699eb3685dcc0f7c736a9aebd76829a8.tar.lz
android_bootable_recovery-430b7ae4699eb3685dcc0f7c736a9aebd76829a8.tar.xz
android_bootable_recovery-430b7ae4699eb3685dcc0f7c736a9aebd76829a8.tar.zst
android_bootable_recovery-430b7ae4699eb3685dcc0f7c736a9aebd76829a8.zip
Diffstat (limited to 'tests/component/edify_test.cpp')
-rw-r--r--tests/component/edify_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/component/edify_test.cpp b/tests/component/edify_test.cpp
index a4dbb9fbe..287e40cc6 100644
--- a/tests/component/edify_test.cpp
+++ b/tests/component/edify_test.cpp
@@ -28,15 +28,15 @@ static void expect(const char* expr_str, const char* expected) {
State state(expr_str, nullptr);
- char* result = Evaluate(&state, e);
+ std::string result;
+ bool status = Evaluate(&state, e, &result);
if (expected == nullptr) {
- EXPECT_EQ(nullptr, result);
+ EXPECT_FALSE(status);
} else {
- EXPECT_STREQ(expected, result);
+ EXPECT_STREQ(expected, result.c_str());
}
- free(result);
}
class EdifyTest : public ::testing::Test {