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

Unified Diff: base/json/json_writer_unittest.cc

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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/json/json_parser.cc ('k') | base/trace_event/trace_event_argument_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/json_writer_unittest.cc
diff --git a/base/json/json_writer_unittest.cc b/base/json/json_writer_unittest.cc
index 03f803f03fea1a913124b64f0e35aec5490491db..083fdc7eb403c14eddfa814ab047b85d7d00d955 100644
--- a/base/json/json_writer_unittest.cc
+++ b/base/json/json_writer_unittest.cc
@@ -27,23 +27,23 @@ TEST(JSONWriterTest, BasicTypes) {
EXPECT_EQ("[]", output_js);
// Test integer values.
- EXPECT_TRUE(JSONWriter::Write(FundamentalValue(42), &output_js));
+ EXPECT_TRUE(JSONWriter::Write(Value(42), &output_js));
EXPECT_EQ("42", output_js);
// Test boolean values.
- EXPECT_TRUE(JSONWriter::Write(FundamentalValue(true), &output_js));
+ EXPECT_TRUE(JSONWriter::Write(Value(true), &output_js));
EXPECT_EQ("true", output_js);
// Test Real values should always have a decimal or an 'e'.
- EXPECT_TRUE(JSONWriter::Write(FundamentalValue(1.0), &output_js));
+ EXPECT_TRUE(JSONWriter::Write(Value(1.0), &output_js));
EXPECT_EQ("1.0", output_js);
// Test Real values in the the range (-1, 1) must have leading zeros
- EXPECT_TRUE(JSONWriter::Write(FundamentalValue(0.2), &output_js));
+ EXPECT_TRUE(JSONWriter::Write(Value(0.2), &output_js));
EXPECT_EQ("0.2", output_js);
// Test Real values in the the range (-1, 1) must have leading zeros
- EXPECT_TRUE(JSONWriter::Write(FundamentalValue(-0.8), &output_js));
+ EXPECT_TRUE(JSONWriter::Write(Value(-0.8), &output_js));
EXPECT_EQ("-0.8", output_js);
// Test String values.
@@ -119,9 +119,9 @@ TEST(JSONWriterTest, BinaryValues) {
ListValue binary_list;
binary_list.Append(BinaryValue::CreateWithCopiedBuffer("asdf", 4));
- binary_list.Append(MakeUnique<FundamentalValue>(5));
+ binary_list.Append(MakeUnique<Value>(5));
binary_list.Append(BinaryValue::CreateWithCopiedBuffer("asdf", 4));
- binary_list.Append(MakeUnique<FundamentalValue>(2));
+ binary_list.Append(MakeUnique<Value>(2));
binary_list.Append(BinaryValue::CreateWithCopiedBuffer("asdf", 4));
EXPECT_FALSE(JSONWriter::Write(binary_list, &output_js));
EXPECT_TRUE(JSONWriter::WriteWithOptions(
@@ -144,7 +144,7 @@ TEST(JSONWriterTest, DoublesAsInts) {
std::string output_js;
// Test allowing a double with no fractional part to be written as an integer.
- FundamentalValue double_value(1e10);
+ Value double_value(1e10);
EXPECT_TRUE(JSONWriter::WriteWithOptions(
double_value, JSONWriter::OPTIONS_OMIT_DOUBLE_TYPE_PRESERVATION,
&output_js));
« no previous file with comments | « base/json/json_parser.cc ('k') | base/trace_event/trace_event_argument_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698