diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-21 01:46:17 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-21 01:46:17 +0000 |
commit | 0c4ea7914810f9f937ef43744e4b1fb2c5491422 (patch) | |
tree | 05f6562773ac9d290c0712247e741dfe26be9e4e | |
parent | ccf175c24e8591b763cecd9209069d51b809083b (diff) | |
download | chromium_src-0c4ea7914810f9f937ef43744e4b1fb2c5491422.zip chromium_src-0c4ea7914810f9f937ef43744e4b1fb2c5491422.tar.gz chromium_src-0c4ea7914810f9f937ef43744e4b1fb2c5491422.tar.bz2 |
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
-rw-r--r-- | base/registry_unittest.cc | 7 |
1 files changed, 6 insertions, 1 deletions
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)); } } |