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

Unified Diff: runtime/vm/object_test.cc

Issue 2977143002: Revert "Option to truncate integers to 64 bits, part 2" (Closed)
Patch Set: Created 3 years, 5 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 | « runtime/vm/object.cc ('k') | runtime/vm/regexp_assembler_ir.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_test.cc
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index bf4515386ce299bdd4e9cc0e6f74c584796de247..e8e04b106c3b4543f4f3dd235aaf0d5fa1142a67 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -337,16 +337,13 @@ ISOLATE_UNIT_TEST_CASE(Smi) {
EXPECT_EQ(-1, c.CompareWith(mint1));
EXPECT_EQ(1, c.CompareWith(mint2));
- if (!Bigint::IsDisabled()) {
- Bigint& big1 =
- Bigint::Handle(Bigint::NewFromCString("10000000000000000000"));
- Bigint& big2 =
- Bigint::Handle(Bigint::NewFromCString("-10000000000000000000"));
- EXPECT_EQ(-1, a.CompareWith(big1));
- EXPECT_EQ(1, a.CompareWith(big2));
- EXPECT_EQ(-1, c.CompareWith(big1));
- EXPECT_EQ(1, c.CompareWith(big2));
- }
+ Bigint& big1 = Bigint::Handle(Bigint::NewFromCString("10000000000000000000"));
+ Bigint& big2 =
+ Bigint::Handle(Bigint::NewFromCString("-10000000000000000000"));
+ EXPECT_EQ(-1, a.CompareWith(big1));
+ EXPECT_EQ(1, a.CompareWith(big2));
+ EXPECT_EQ(-1, c.CompareWith(big1));
+ EXPECT_EQ(1, c.CompareWith(big2));
}
ISOLATE_UNIT_TEST_CASE(StringCompareTo) {
@@ -495,16 +492,13 @@ ISOLATE_UNIT_TEST_CASE(Mint) {
EXPECT_EQ(-1, c.CompareWith(smi1));
EXPECT_EQ(-1, c.CompareWith(smi2));
- if (!Bigint::IsDisabled()) {
- Bigint& big1 =
- Bigint::Handle(Bigint::NewFromCString("10000000000000000000"));
- Bigint& big2 =
- Bigint::Handle(Bigint::NewFromCString("-10000000000000000000"));
- EXPECT_EQ(-1, a.CompareWith(big1));
- EXPECT_EQ(1, a.CompareWith(big2));
- EXPECT_EQ(-1, c.CompareWith(big1));
- EXPECT_EQ(1, c.CompareWith(big2));
- }
+ Bigint& big1 = Bigint::Handle(Bigint::NewFromCString("10000000000000000000"));
+ Bigint& big2 =
+ Bigint::Handle(Bigint::NewFromCString("-10000000000000000000"));
+ EXPECT_EQ(-1, a.CompareWith(big1));
+ EXPECT_EQ(1, a.CompareWith(big2));
+ EXPECT_EQ(-1, c.CompareWith(big1));
+ EXPECT_EQ(1, c.CompareWith(big2));
int64_t mint_value = DART_2PART_UINT64_C(0x7FFFFFFF, 64);
const String& mint_string = String::Handle(String::New("0x7FFFFFFF00000064"));
@@ -602,10 +596,6 @@ ISOLATE_UNIT_TEST_CASE(Double) {
}
ISOLATE_UNIT_TEST_CASE(Bigint) {
- if (Bigint::IsDisabled()) {
- return;
- }
-
Bigint& b = Bigint::Handle();
EXPECT(b.IsNull());
const char* cstr = "18446744073709551615000";
@@ -653,10 +643,10 @@ ISOLATE_UNIT_TEST_CASE(Integer) {
EXPECT(i.IsSmi());
i = Integer::NewCanonical(
String::Handle(String::New("12345678901234567890")));
- EXPECT(FLAG_limit_ints_to_64_bits ? i.IsNull() : i.IsBigint());
+ EXPECT(i.IsBigint());
i = Integer::NewCanonical(
String::Handle(String::New("-12345678901234567890111222")));
- EXPECT(FLAG_limit_ints_to_64_bits ? i.IsNull() : i.IsBigint());
+ EXPECT(i.IsBigint());
}
ISOLATE_UNIT_TEST_CASE(String) {
@@ -4174,7 +4164,7 @@ ISOLATE_UNIT_TEST_CASE(PrintJSONPrimitives) {
buffer);
}
// Bigint reference
- if (!Bigint::IsDisabled()) {
+ {
JSONStream js;
const String& bigint_str =
String::Handle(String::New("44444444444444444444444444444444"));
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/regexp_assembler_ir.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698