From 0c4ea7914810f9f937ef43744e4b1fb2c5491422 Mon Sep 17 00:00:00 2001 From: "tfarina@chromium.org" Date: Sat, 21 Aug 2010 01:46:17 +0000 Subject: base: Add basic ReadValue test to RegistryTest. BUG=None TEST=out/Debug/base_unittests --gtest_filter=RegistryTest.* Review URL: http://codereview.chromium.org/3190010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56965 0039d316-1c4b-4281-b951-d872f2087c98 --- base/registry_unittest.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/base/registry_unittest.cc b/base/registry_unittest.cc index ac06a9f..a7d30ba 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)); } } -- cgit v1.1