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

Side by Side Diff: base/registry_unittest.cc

Issue 3132035: base: Assert that RegKey::ValueCount() is updated according in RegistryTest. (Closed) Base URL: http://src.chromium.org/git/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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/registry.h" 5 #include "base/registry.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 namespace { 8 namespace {
9 9
10 const wchar_t kRootKey[] = L"Base_Registry_Unittest"; 10 const wchar_t kRootKey[] = L"Base_Registry_Unittest";
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 KEY_READ | KEY_SET_VALUE)); 44 KEY_READ | KEY_SET_VALUE));
45 45
46 const wchar_t* kName = L"Bar"; 46 const wchar_t* kName = L"Bar";
47 const wchar_t* kValue = L"bar"; 47 const wchar_t* kValue = L"bar";
48 EXPECT_TRUE(key.WriteValue(kName, kValue)); 48 EXPECT_TRUE(key.WriteValue(kName, kValue));
49 EXPECT_TRUE(key.ValueExists(kName)); 49 EXPECT_TRUE(key.ValueExists(kName));
50 std::wstring out_value; 50 std::wstring out_value;
51 EXPECT_TRUE(key.ReadValue(kName, &out_value)); 51 EXPECT_TRUE(key.ReadValue(kName, &out_value));
52 EXPECT_NE(out_value, L""); 52 EXPECT_NE(out_value, L"");
53 EXPECT_STREQ(out_value.c_str(), kValue); 53 EXPECT_STREQ(out_value.c_str(), kValue);
54 EXPECT_EQ(1U, key.ValueCount());
54 EXPECT_TRUE(key.DeleteValue(kName)); 55 EXPECT_TRUE(key.DeleteValue(kName));
55 } 56 }
56 } 57 }
57 58
58 } // namespace 59 } // namespace
OLDNEW
« 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