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

Unified Diff: base/prefs/pref_value_map_unittest.cc

Issue 390233003: Decrement CreateDoubleValue count (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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 | « base/prefs/pref_value_map.cc ('k') | cc/base/math_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/pref_value_map_unittest.cc
diff --git a/base/prefs/pref_value_map_unittest.cc b/base/prefs/pref_value_map_unittest.cc
index 8cc51ad02ce0cb077264bba039892c37e5d49aeb..82499daf9c37bbbe563163ac87b9b3ae4a7545c9 100644
--- a/base/prefs/pref_value_map_unittest.cc
+++ b/base/prefs/pref_value_map_unittest.cc
@@ -37,6 +37,17 @@ TEST(PrefValueMapTest, GetAndSetIntegerValue) {
EXPECT_EQ(-14, int_value);
}
+TEST(PrefValueMapTest, SetDoubleValue) {
+ PrefValueMap map;
+ ASSERT_TRUE(map.SetValue("key", new FundamentalValue(5.5)));
+
+ const Value* result = NULL;
+ ASSERT_TRUE(map.GetValue("key", &result));
+ double double_value = 0.;
+ EXPECT_TRUE(result->GetAsDouble(&double_value));
+ EXPECT_DOUBLE_EQ(5.5, double_value);
+}
+
TEST(PrefValueMapTest, RemoveValue) {
PrefValueMap map;
EXPECT_FALSE(map.RemoveValue("key"));
« no previous file with comments | « base/prefs/pref_value_map.cc ('k') | cc/base/math_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698