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

Unified Diff: trunk/src/net/base/int128_unittest.cc

Issue 227743006: Revert 262147 "Remove all uses of GG_LONGLONG and GG_ULONGLONG." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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 | « trunk/src/net/base/int128.cc ('k') | trunk/src/sql/meta_table_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/net/base/int128_unittest.cc
===================================================================
--- trunk/src/net/base/int128_unittest.cc (revision 262163)
+++ trunk/src/net/base/int128_unittest.cc (working copy)
@@ -230,18 +230,24 @@
}
// Verified with dc.
- a = uint128(0xffffeeeeddddccccULL, 0xbbbbaaaa99998888ULL);
- b = uint128(0x7777666655554444ULL, 0x3333222211110000ULL);
+ a = uint128(GG_ULONGLONG(0xffffeeeeddddcccc),
+ GG_ULONGLONG(0xbbbbaaaa99998888));
+ b = uint128(GG_ULONGLONG(0x7777666655554444),
+ GG_ULONGLONG(0x3333222211110000));
c = a * b;
- EXPECT_EQ(uint128(0x530EDA741C71D4C3ULL, 0xBF25975319080000ULL), c);
+ EXPECT_EQ(uint128(GG_ULONGLONG(0x530EDA741C71D4C3),
+ GG_ULONGLONG(0xBF25975319080000)), c);
EXPECT_EQ(0, c - b * a);
EXPECT_EQ(a*a - b*b, (a+b) * (a-b));
// Verified with dc.
- a = uint128(0x0123456789abcdefULL, 0xfedcba9876543210ULL);
- b = uint128(0x02468ace13579bdfULL, 0xfdb97531eca86420ULL);
+ a = uint128(GG_ULONGLONG(0x0123456789abcdef),
+ GG_ULONGLONG(0xfedcba9876543210));
+ b = uint128(GG_ULONGLONG(0x02468ace13579bdf),
+ GG_ULONGLONG(0xfdb97531eca86420));
c = a * b;
- EXPECT_EQ(uint128(0x97a87f4f261ba3f2ULL, 0x342d0bbf48948200ULL), c);
+ EXPECT_EQ(uint128(GG_ULONGLONG(0x97a87f4f261ba3f2),
+ GG_ULONGLONG(0x342d0bbf48948200)), c);
EXPECT_EQ(0, c - b * a);
EXPECT_EQ(a*a - b*b, (a+b) * (a-b));
}
« no previous file with comments | « trunk/src/net/base/int128.cc ('k') | trunk/src/sql/meta_table_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698