Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: base/registry_unittest.cc

Issue 3190010: base: Add basic ReadValue test to RegistryTest. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/registry_unittest.cc
diff --git a/base/registry_unittest.cc b/base/registry_unittest.cc
index ac06a9fb6a2bd246855a6c983dcfaa44c5063cc7..a7d30bada07ddb877d9c68e9cc70d62106fc1b8e 100644
--- a/base/registry_unittest.cc
+++ b/base/registry_unittest.cc
@@ -44,8 +44,13 @@ TEST_F(RegistryTest, ValueTest) {
KEY_READ | KEY_SET_VALUE));
const wchar_t* kName = L"Bar";
- EXPECT_TRUE(key.WriteValue(kName, L"bar"));
+ const wchar_t* kValue = L"bar";
+ EXPECT_TRUE(key.WriteValue(kName, kValue));
EXPECT_TRUE(key.ValueExists(kName));
+ std::wstring out_value;
+ EXPECT_TRUE(key.ReadValue(kName, &out_value));
+ EXPECT_NE(out_value, L"");
+ EXPECT_STREQ(out_value.c_str(), kValue);
EXPECT_TRUE(key.DeleteValue(kName));
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698