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

Unified Diff: chrome/common/json_schema_validator_unittest_base.cc

Issue 6248026: Rename Real* to Double* in values.* and dependent files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More renames Created 9 years, 11 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
Index: chrome/common/json_schema_validator_unittest_base.cc
diff --git a/chrome/common/json_schema_validator_unittest_base.cc b/chrome/common/json_schema_validator_unittest_base.cc
index 782d6bc4f16cf21275b03379b86c04522e47c7a5..6d2c1bb0201a8d1615e97394487ab90a7b22c020 100644
--- a/chrome/common/json_schema_validator_unittest_base.cc
+++ b/chrome/common/json_schema_validator_unittest_base.cc
@@ -441,18 +441,18 @@ void JSONSchemaValidatorTestBase::TestNumber() {
scoped_ptr<Value>(Value::CreateIntegerValue(100)).get(),
schema.get(), NULL);
ExpectValid(TEST_SOURCE,
- scoped_ptr<Value>(Value::CreateRealValue(88.88)).get(),
+ scoped_ptr<Value>(Value::CreateDoubleValue(88.88)).get(),
schema.get(), NULL);
ExpectNotValid(
TEST_SOURCE,
- scoped_ptr<Value>(Value::CreateRealValue(0.5)).get(),
+ scoped_ptr<Value>(Value::CreateDoubleValue(0.5)).get(),
schema.get(), NULL, "",
JSONSchemaValidator::FormatErrorMessage(
JSONSchemaValidator::kNumberMinimum, "1"));
ExpectNotValid(
TEST_SOURCE,
- scoped_ptr<Value>(Value::CreateRealValue(100.1)).get(),
+ scoped_ptr<Value>(Value::CreateDoubleValue(100.1)).get(),
schema.get(), NULL, "",
JSONSchemaValidator::FormatErrorMessage(
JSONSchemaValidator::kNumberMaximum, "100"));
@@ -472,23 +472,23 @@ void JSONSchemaValidatorTestBase::TestTypeClassifier() {
EXPECT_EQ("integer", JSONSchemaValidator::GetJSONSchemaType(
scoped_ptr<Value>(Value::CreateIntegerValue(0)).get()));
EXPECT_EQ("integer", JSONSchemaValidator::GetJSONSchemaType(
- scoped_ptr<Value>(Value::CreateRealValue(42)).get()));
+ scoped_ptr<Value>(Value::CreateDoubleValue(42)).get()));
EXPECT_EQ("integer", JSONSchemaValidator::GetJSONSchemaType(
scoped_ptr<Value>(
- Value::CreateRealValue(pow(2.0, DBL_MANT_DIG))).get()));
+ Value::CreateDoubleValue(pow(2.0, DBL_MANT_DIG))).get()));
EXPECT_EQ("integer", JSONSchemaValidator::GetJSONSchemaType(
scoped_ptr<Value>(
- Value::CreateRealValue(pow(-2.0, DBL_MANT_DIG))).get()));
+ Value::CreateDoubleValue(pow(-2.0, DBL_MANT_DIG))).get()));
// "number" is only used for non-integral numbers, or numbers beyond what
// double can accurately represent.
EXPECT_EQ("number", JSONSchemaValidator::GetJSONSchemaType(
- scoped_ptr<Value>(Value::CreateRealValue(88.8)).get()));
+ scoped_ptr<Value>(Value::CreateDoubleValue(88.8)).get()));
EXPECT_EQ("number", JSONSchemaValidator::GetJSONSchemaType(
- scoped_ptr<Value>(Value::CreateRealValue(
+ scoped_ptr<Value>(Value::CreateDoubleValue(
pow(2.0, DBL_MANT_DIG) * 2)).get()));
EXPECT_EQ("number", JSONSchemaValidator::GetJSONSchemaType(
- scoped_ptr<Value>(Value::CreateRealValue(
+ scoped_ptr<Value>(Value::CreateDoubleValue(
pow(-2.0, DBL_MANT_DIG) * 2)).get()));
EXPECT_EQ("string", JSONSchemaValidator::GetJSONSchemaType(
@@ -520,10 +520,10 @@ void JSONSchemaValidatorTestBase::TestTypes() {
schema->SetString("type", "number");
ExpectValid(TEST_SOURCE,
- scoped_ptr<Value>(Value::CreateRealValue(88.8)).get(),
+ scoped_ptr<Value>(Value::CreateDoubleValue(88.8)).get(),
schema.get(), NULL);
ExpectValid(TEST_SOURCE,
- scoped_ptr<Value>(Value::CreateRealValue(42)).get(),
+ scoped_ptr<Value>(Value::CreateDoubleValue(42)).get(),
schema.get(), NULL);
ExpectValid(TEST_SOURCE,
scoped_ptr<Value>(Value::CreateIntegerValue(42)).get(),
@@ -537,18 +537,18 @@ void JSONSchemaValidatorTestBase::TestTypes() {
scoped_ptr<Value>(Value::CreateIntegerValue(42)).get(),
schema.get(), NULL);
ExpectValid(TEST_SOURCE,
- scoped_ptr<Value>(Value::CreateRealValue(42)).get(),
+ scoped_ptr<Value>(Value::CreateDoubleValue(42)).get(),
schema.get(), NULL);
ExpectValid(TEST_SOURCE,
scoped_ptr<Value>(Value::CreateIntegerValue(0)).get(),
schema.get(), NULL);
ExpectValid(TEST_SOURCE,
scoped_ptr<Value>(
- Value::CreateRealValue(pow(2.0, DBL_MANT_DIG))).get(),
+ Value::CreateDoubleValue(pow(2.0, DBL_MANT_DIG))).get(),
schema.get(), NULL);
ExpectValid(TEST_SOURCE,
scoped_ptr<Value>(
- Value::CreateRealValue(pow(-2.0, DBL_MANT_DIG))).get(),
+ Value::CreateDoubleValue(pow(-2.0, DBL_MANT_DIG))).get(),
schema.get(), NULL);
schema->SetString("type", "boolean");
@@ -600,14 +600,14 @@ void JSONSchemaValidatorTestBase::TestTypes() {
schema->SetString("type", "integer");
ExpectNotValid(TEST_SOURCE,
- scoped_ptr<Value>(Value::CreateRealValue(88.8)).get(),
+ scoped_ptr<Value>(Value::CreateDoubleValue(88.8)).get(),
schema.get(), NULL, "",
JSONSchemaValidator::FormatErrorMessage(
JSONSchemaValidator::kInvalidType, "integer", "number"));
schema->SetString("type", "integer");
ExpectNotValid(TEST_SOURCE,
- scoped_ptr<Value>(Value::CreateRealValue(88.8)).get(),
+ scoped_ptr<Value>(Value::CreateDoubleValue(88.8)).get(),
schema.get(), NULL, "",
JSONSchemaValidator::FormatErrorMessage(
JSONSchemaValidator::kInvalidType, "integer", "number"));

Powered by Google App Engine
This is Rietveld 408576698