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

Unified Diff: Source/platform/DecimalTest.cpp

Issue 281033002: Fix MaxCoefficient static variable value in Decimal.cpp (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: use lowercase x Created 6 years, 7 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 | « Source/platform/Decimal.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/DecimalTest.cpp
diff --git a/Source/platform/DecimalTest.cpp b/Source/platform/DecimalTest.cpp
index e4cf0e010826f225f7c34dbff77294d70084613c..eb26dc43bce8906016372617272eb6930457b8ef 100644
--- a/Source/platform/DecimalTest.cpp
+++ b/Source/platform/DecimalTest.cpp
@@ -482,8 +482,8 @@ TEST_F(DecimalTest, Constructor)
EXPECT_DECIMAL_ENCODED_DATA_EQ(UINT64_C(99999999999999998), 0, Negative, encode(UINT64_C(99999999999999998), 0, Negative));
EXPECT_DECIMAL_ENCODED_DATA_EQ(UINT64_C(99999999999999999), 0, Positive, encode(UINT64_C(99999999999999999), 0, Positive));
EXPECT_DECIMAL_ENCODED_DATA_EQ(UINT64_C(99999999999999999), 0, Negative, encode(UINT64_C(99999999999999999), 0, Negative));
- EXPECT_DECIMAL_ENCODED_DATA_EQ(UINT64_C(10000000000000000), 1, Positive, encode(UINT64_C(100000000000000000), 0, Positive));
- EXPECT_DECIMAL_ENCODED_DATA_EQ(UINT64_C(10000000000000000), 1, Negative, encode(UINT64_C(100000000000000000), 0, Negative));
+ EXPECT_DECIMAL_ENCODED_DATA_EQ(UINT64_C(100000000000000000), 0, Positive, encode(UINT64_C(100000000000000000), 0, Positive));
+ EXPECT_DECIMAL_ENCODED_DATA_EQ(UINT64_C(100000000000000000), 0, Negative, encode(UINT64_C(100000000000000000), 0, Negative));
}
TEST_F(DecimalTest, Division)
@@ -493,7 +493,7 @@ TEST_F(DecimalTest, Division)
EXPECT_EQ(encode(5, -1, Negative), Decimal(-1) / Decimal(2));
EXPECT_EQ(encode(99, 0, Positive), Decimal(99) / Decimal(1));
EXPECT_EQ(Decimal(1), Decimal(-50) / Decimal(-50));
- EXPECT_EQ(encode(UINT64_C(3333333333333333), -16, Positive), Decimal(1) / Decimal(3));
+ EXPECT_EQ(encode(UINT64_C(33333333333333333), -17, Positive), Decimal(1) / Decimal(3));
EXPECT_EQ(encode(UINT64_C(12345678901234), -1, Positive), encode(UINT64_C(12345678901234), 0, Positive) / Decimal(10));
}
@@ -920,7 +920,7 @@ TEST_F(DecimalTest, Remainder)
EXPECT_EQ(encode(2, -1, Positive), encode(102, -1, Positive).remainder(1));
EXPECT_EQ(encode(1, -1, Positive), Decimal(10).remainder(encode(3, -1, Positive)));
EXPECT_EQ(Decimal(1), encode(36, -1, Positive).remainder(encode(13, -1, Positive)));
- EXPECT_EQ(encode(1, 87, Positive), (encode(1234, 100, Positive).remainder(Decimal(3))));
+ EXPECT_EQ(encode(1, 86, Positive), (encode(1234, 100, Positive).remainder(Decimal(3))));
EXPECT_EQ(Decimal(500), (Decimal(500).remainder(1000)));
EXPECT_EQ(Decimal(-500), (Decimal(-500).remainder(1000)));
}
« no previous file with comments | « Source/platform/Decimal.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698