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

Unified Diff: test/cctest/test-fixed-dtoa.cc

Issue 888613002: Initial switch to Chromium-style CHECK_* and DCHECK_* macros. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: CHECK_NULL/NOT_NULL is back. Created 5 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
« no previous file with comments | « test/cctest/test-feedback-vector.cc ('k') | test/cctest/test-flags.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-fixed-dtoa.cc
diff --git a/test/cctest/test-fixed-dtoa.cc b/test/cctest/test-fixed-dtoa.cc
index de40d09f1bf1fdd71b7724b77baf38eb87acefe3..7c2cc2eb15bde8e88855d0003bea395dacdb6195 100644
--- a/test/cctest/test-fixed-dtoa.cc
+++ b/test/cctest/test-fixed-dtoa.cc
@@ -46,445 +46,445 @@ TEST(FastFixedVariousDoubles) {
int point;
CHECK(FastFixedDtoa(1.0, 1, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(1.0, 15, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(1.0, 0, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0xFFFFFFFF, 5, buffer, &length, &point));
- CHECK_EQ("4294967295", buffer.start());
+ CHECK_EQ(0, strcmp("4294967295", buffer.start()));
CHECK_EQ(10, point);
CHECK(FastFixedDtoa(4294967296.0, 5, buffer, &length, &point));
- CHECK_EQ("4294967296", buffer.start());
+ CHECK_EQ(0, strcmp("4294967296", buffer.start()));
CHECK_EQ(10, point);
CHECK(FastFixedDtoa(1e21, 5, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
// CHECK_EQ(22, point);
CHECK_EQ(22, point);
CHECK(FastFixedDtoa(999999999999999868928.00, 2, buffer, &length, &point));
- CHECK_EQ("999999999999999868928", buffer.start());
+ CHECK_EQ(0, strcmp("999999999999999868928", buffer.start()));
CHECK_EQ(21, point);
CHECK(FastFixedDtoa(6.9999999999999989514240000e+21, 5, buffer,
&length, &point));
- CHECK_EQ("6999999999999998951424", buffer.start());
+ CHECK_EQ(0, strcmp("6999999999999998951424", buffer.start()));
CHECK_EQ(22, point);
CHECK(FastFixedDtoa(1.5, 5, buffer, &length, &point));
- CHECK_EQ("15", buffer.start());
+ CHECK_EQ(0, strcmp("15", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(1.55, 5, buffer, &length, &point));
- CHECK_EQ("155", buffer.start());
+ CHECK_EQ(0, strcmp("155", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(1.55, 1, buffer, &length, &point));
- CHECK_EQ("16", buffer.start());
+ CHECK_EQ(0, strcmp("16", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(1.00000001, 15, buffer, &length, &point));
- CHECK_EQ("100000001", buffer.start());
+ CHECK_EQ(0, strcmp("100000001", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.1, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(0, point);
CHECK(FastFixedDtoa(0.01, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-1, point);
CHECK(FastFixedDtoa(0.001, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-2, point);
CHECK(FastFixedDtoa(0.0001, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-3, point);
CHECK(FastFixedDtoa(0.00001, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-4, point);
CHECK(FastFixedDtoa(0.000001, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-5, point);
CHECK(FastFixedDtoa(0.0000001, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-6, point);
CHECK(FastFixedDtoa(0.00000001, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-7, point);
CHECK(FastFixedDtoa(0.000000001, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-8, point);
CHECK(FastFixedDtoa(0.0000000001, 15, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-9, point);
CHECK(FastFixedDtoa(0.00000000001, 15, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-10, point);
CHECK(FastFixedDtoa(0.000000000001, 15, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-11, point);
CHECK(FastFixedDtoa(0.0000000000001, 15, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-12, point);
CHECK(FastFixedDtoa(0.00000000000001, 15, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-13, point);
CHECK(FastFixedDtoa(0.000000000000001, 20, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-14, point);
CHECK(FastFixedDtoa(0.0000000000000001, 20, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-15, point);
CHECK(FastFixedDtoa(0.00000000000000001, 20, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-16, point);
CHECK(FastFixedDtoa(0.000000000000000001, 20, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-17, point);
CHECK(FastFixedDtoa(0.0000000000000000001, 20, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-18, point);
CHECK(FastFixedDtoa(0.00000000000000000001, 20, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-19, point);
CHECK(FastFixedDtoa(0.10000000004, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(0, point);
CHECK(FastFixedDtoa(0.01000000004, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-1, point);
CHECK(FastFixedDtoa(0.00100000004, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-2, point);
CHECK(FastFixedDtoa(0.00010000004, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-3, point);
CHECK(FastFixedDtoa(0.00001000004, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-4, point);
CHECK(FastFixedDtoa(0.00000100004, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-5, point);
CHECK(FastFixedDtoa(0.00000010004, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-6, point);
CHECK(FastFixedDtoa(0.00000001004, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-7, point);
CHECK(FastFixedDtoa(0.00000000104, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-8, point);
CHECK(FastFixedDtoa(0.0000000001000004, 15, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-9, point);
CHECK(FastFixedDtoa(0.0000000000100004, 15, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-10, point);
CHECK(FastFixedDtoa(0.0000000000010004, 15, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-11, point);
CHECK(FastFixedDtoa(0.0000000000001004, 15, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-12, point);
CHECK(FastFixedDtoa(0.0000000000000104, 15, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-13, point);
CHECK(FastFixedDtoa(0.000000000000001000004, 20, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-14, point);
CHECK(FastFixedDtoa(0.000000000000000100004, 20, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-15, point);
CHECK(FastFixedDtoa(0.000000000000000010004, 20, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-16, point);
CHECK(FastFixedDtoa(0.000000000000000001004, 20, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-17, point);
CHECK(FastFixedDtoa(0.000000000000000000104, 20, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-18, point);
CHECK(FastFixedDtoa(0.000000000000000000014, 20, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-19, point);
CHECK(FastFixedDtoa(0.10000000006, 10, buffer, &length, &point));
- CHECK_EQ("1000000001", buffer.start());
+ CHECK_EQ(0, strcmp("1000000001", buffer.start()));
CHECK_EQ(0, point);
CHECK(FastFixedDtoa(0.01000000006, 10, buffer, &length, &point));
- CHECK_EQ("100000001", buffer.start());
+ CHECK_EQ(0, strcmp("100000001", buffer.start()));
CHECK_EQ(-1, point);
CHECK(FastFixedDtoa(0.00100000006, 10, buffer, &length, &point));
- CHECK_EQ("10000001", buffer.start());
+ CHECK_EQ(0, strcmp("10000001", buffer.start()));
CHECK_EQ(-2, point);
CHECK(FastFixedDtoa(0.00010000006, 10, buffer, &length, &point));
- CHECK_EQ("1000001", buffer.start());
+ CHECK_EQ(0, strcmp("1000001", buffer.start()));
CHECK_EQ(-3, point);
CHECK(FastFixedDtoa(0.00001000006, 10, buffer, &length, &point));
- CHECK_EQ("100001", buffer.start());
+ CHECK_EQ(0, strcmp("100001", buffer.start()));
CHECK_EQ(-4, point);
CHECK(FastFixedDtoa(0.00000100006, 10, buffer, &length, &point));
- CHECK_EQ("10001", buffer.start());
+ CHECK_EQ(0, strcmp("10001", buffer.start()));
CHECK_EQ(-5, point);
CHECK(FastFixedDtoa(0.00000010006, 10, buffer, &length, &point));
- CHECK_EQ("1001", buffer.start());
+ CHECK_EQ(0, strcmp("1001", buffer.start()));
CHECK_EQ(-6, point);
CHECK(FastFixedDtoa(0.00000001006, 10, buffer, &length, &point));
- CHECK_EQ("101", buffer.start());
+ CHECK_EQ(0, strcmp("101", buffer.start()));
CHECK_EQ(-7, point);
CHECK(FastFixedDtoa(0.00000000106, 10, buffer, &length, &point));
- CHECK_EQ("11", buffer.start());
+ CHECK_EQ(0, strcmp("11", buffer.start()));
CHECK_EQ(-8, point);
CHECK(FastFixedDtoa(0.0000000001000006, 15, buffer, &length, &point));
- CHECK_EQ("100001", buffer.start());
+ CHECK_EQ(0, strcmp("100001", buffer.start()));
CHECK_EQ(-9, point);
CHECK(FastFixedDtoa(0.0000000000100006, 15, buffer, &length, &point));
- CHECK_EQ("10001", buffer.start());
+ CHECK_EQ(0, strcmp("10001", buffer.start()));
CHECK_EQ(-10, point);
CHECK(FastFixedDtoa(0.0000000000010006, 15, buffer, &length, &point));
- CHECK_EQ("1001", buffer.start());
+ CHECK_EQ(0, strcmp("1001", buffer.start()));
CHECK_EQ(-11, point);
CHECK(FastFixedDtoa(0.0000000000001006, 15, buffer, &length, &point));
- CHECK_EQ("101", buffer.start());
+ CHECK_EQ(0, strcmp("101", buffer.start()));
CHECK_EQ(-12, point);
CHECK(FastFixedDtoa(0.0000000000000106, 15, buffer, &length, &point));
- CHECK_EQ("11", buffer.start());
+ CHECK_EQ(0, strcmp("11", buffer.start()));
CHECK_EQ(-13, point);
CHECK(FastFixedDtoa(0.000000000000001000006, 20, buffer, &length, &point));
- CHECK_EQ("100001", buffer.start());
+ CHECK_EQ(0, strcmp("100001", buffer.start()));
CHECK_EQ(-14, point);
CHECK(FastFixedDtoa(0.000000000000000100006, 20, buffer, &length, &point));
- CHECK_EQ("10001", buffer.start());
+ CHECK_EQ(0, strcmp("10001", buffer.start()));
CHECK_EQ(-15, point);
CHECK(FastFixedDtoa(0.000000000000000010006, 20, buffer, &length, &point));
- CHECK_EQ("1001", buffer.start());
+ CHECK_EQ(0, strcmp("1001", buffer.start()));
CHECK_EQ(-16, point);
CHECK(FastFixedDtoa(0.000000000000000001006, 20, buffer, &length, &point));
- CHECK_EQ("101", buffer.start());
+ CHECK_EQ(0, strcmp("101", buffer.start()));
CHECK_EQ(-17, point);
CHECK(FastFixedDtoa(0.000000000000000000106, 20, buffer, &length, &point));
- CHECK_EQ("11", buffer.start());
+ CHECK_EQ(0, strcmp("11", buffer.start()));
CHECK_EQ(-18, point);
CHECK(FastFixedDtoa(0.000000000000000000016, 20, buffer, &length, &point));
- CHECK_EQ("2", buffer.start());
+ CHECK_EQ(0, strcmp("2", buffer.start()));
CHECK_EQ(-19, point);
CHECK(FastFixedDtoa(0.6, 0, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.96, 1, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.996, 2, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.9996, 3, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.99996, 4, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.999996, 5, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.9999996, 6, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.99999996, 7, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.999999996, 8, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.9999999996, 9, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.99999999996, 10, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.999999999996, 11, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.9999999999996, 12, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.99999999999996, 13, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.999999999999996, 14, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.9999999999999996, 15, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(0.00999999999999996, 16, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-1, point);
CHECK(FastFixedDtoa(0.000999999999999996, 17, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-2, point);
CHECK(FastFixedDtoa(0.0000999999999999996, 18, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-3, point);
CHECK(FastFixedDtoa(0.00000999999999999996, 19, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-4, point);
CHECK(FastFixedDtoa(0.000000999999999999996, 20, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-5, point);
CHECK(FastFixedDtoa(323423.234234, 10, buffer, &length, &point));
- CHECK_EQ("323423234234", buffer.start());
+ CHECK_EQ(0, strcmp("323423234234", buffer.start()));
CHECK_EQ(6, point);
CHECK(FastFixedDtoa(12345678.901234, 4, buffer, &length, &point));
- CHECK_EQ("123456789012", buffer.start());
+ CHECK_EQ(0, strcmp("123456789012", buffer.start()));
CHECK_EQ(8, point);
CHECK(FastFixedDtoa(98765.432109, 5, buffer, &length, &point));
- CHECK_EQ("9876543211", buffer.start());
+ CHECK_EQ(0, strcmp("9876543211", buffer.start()));
CHECK_EQ(5, point);
CHECK(FastFixedDtoa(42, 20, buffer, &length, &point));
- CHECK_EQ("42", buffer.start());
+ CHECK_EQ(0, strcmp("42", buffer.start()));
CHECK_EQ(2, point);
CHECK(FastFixedDtoa(0.5, 0, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(1, point);
CHECK(FastFixedDtoa(1e-23, 10, buffer, &length, &point));
- CHECK_EQ("", buffer.start());
+ CHECK_EQ(0, strcmp("", buffer.start()));
CHECK_EQ(-10, point);
CHECK(FastFixedDtoa(1e-123, 2, buffer, &length, &point));
- CHECK_EQ("", buffer.start());
+ CHECK_EQ(0, strcmp("", buffer.start()));
CHECK_EQ(-2, point);
CHECK(FastFixedDtoa(1e-123, 0, buffer, &length, &point));
- CHECK_EQ("", buffer.start());
+ CHECK_EQ(0, strcmp("", buffer.start()));
CHECK_EQ(0, point);
CHECK(FastFixedDtoa(1e-23, 20, buffer, &length, &point));
- CHECK_EQ("", buffer.start());
+ CHECK_EQ(0, strcmp("", buffer.start()));
CHECK_EQ(-20, point);
CHECK(FastFixedDtoa(1e-21, 20, buffer, &length, &point));
- CHECK_EQ("", buffer.start());
+ CHECK_EQ(0, strcmp("", buffer.start()));
CHECK_EQ(-20, point);
CHECK(FastFixedDtoa(1e-22, 20, buffer, &length, &point));
- CHECK_EQ("", buffer.start());
+ CHECK_EQ(0, strcmp("", buffer.start()));
CHECK_EQ(-20, point);
CHECK(FastFixedDtoa(6e-21, 20, buffer, &length, &point));
- CHECK_EQ("1", buffer.start());
+ CHECK_EQ(0, strcmp("1", buffer.start()));
CHECK_EQ(-19, point);
CHECK(FastFixedDtoa(9.1193616301674545152000000e+19, 0,
buffer, &length, &point));
- CHECK_EQ("91193616301674545152", buffer.start());
+ CHECK_EQ(0, strcmp("91193616301674545152", buffer.start()));
CHECK_EQ(20, point);
CHECK(FastFixedDtoa(4.8184662102767651659096515e-04, 19,
buffer, &length, &point));
- CHECK_EQ("4818466210276765", buffer.start());
+ CHECK_EQ(0, strcmp("4818466210276765", buffer.start()));
CHECK_EQ(-3, point);
CHECK(FastFixedDtoa(1.9023164229540652612705182e-23, 8,
buffer, &length, &point));
- CHECK_EQ("", buffer.start());
+ CHECK_EQ(0, strcmp("", buffer.start()));
CHECK_EQ(-8, point);
CHECK(FastFixedDtoa(1000000000000000128.0, 0,
buffer, &length, &point));
- CHECK_EQ("1000000000000000128", buffer.start());
+ CHECK_EQ(0, strcmp("1000000000000000128", buffer.start()));
CHECK_EQ(19, point);
}
@@ -507,6 +507,6 @@ TEST(FastFixedDtoaGayFixed) {
CHECK(status);
CHECK_EQ(current_test.decimal_point, point);
CHECK_GE(number_digits, length - point);
- CHECK_EQ(current_test.representation, buffer.start());
+ CHECK_EQ(0, strcmp(current_test.representation, buffer.start()));
}
}
« no previous file with comments | « test/cctest/test-feedback-vector.cc ('k') | test/cctest/test-flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698