Change StringValue to use std::string

Changing the field of 'Value' in edify to std::string from char*.
Meanwhile cleaning up the users of 'Value' and switching them to
cpp style.

Test: compontent tests passed.
Bug: 31713288

Change-Id: Iec5a7d601b1e4ca40935bf1c70d325dafecec235
This commit is contained in:
Tianjie Xu
2016-10-15 01:18:23 +00:00
parent c5b4b71913
commit aced5d9e4e
16 changed files with 507 additions and 530 deletions
+4 -4
View File
@@ -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 {