| Index: runtime/vm/bigint_test.cc
|
| diff --git a/runtime/vm/bigint_test.cc b/runtime/vm/bigint_test.cc
|
| index 8ccf464e2e19589a8822be19b1fcdc466ee8ba20..4644a4c3095849e0ad95dfd83cba8941f58a6771 100644
|
| --- a/runtime/vm/bigint_test.cc
|
| +++ b/runtime/vm/bigint_test.cc
|
| @@ -10,6 +10,10 @@
|
| namespace dart {
|
|
|
| TEST_CASE(BigintSmi) {
|
| + if (Bigint::IsDisabled()) {
|
| + return;
|
| + }
|
| +
|
| {
|
| const Smi& smi = Smi::Handle(Smi::New(5));
|
| const Bigint& bigint = Bigint::Handle(Bigint::NewFromInt64(smi.Value()));
|
| @@ -65,6 +69,10 @@ TEST_CASE(BigintSmi) {
|
| }
|
|
|
| TEST_CASE(BigintInt64) {
|
| + if (Bigint::IsDisabled()) {
|
| + return;
|
| + }
|
| +
|
| const int64_t kValue = 100000000;
|
| const int64_t kValue64 = kValue * kValue;
|
| Bigint& bigint = Bigint::Handle(Bigint::NewFromInt64(kValue));
|
| @@ -79,6 +87,10 @@ TEST_CASE(BigintInt64) {
|
| }
|
|
|
| TEST_CASE(BigintUint64) {
|
| + if (Bigint::IsDisabled()) {
|
| + return;
|
| + }
|
| +
|
| const Bigint& one = Bigint::Handle(Bigint::NewFromUint64(1));
|
| EXPECT(one.FitsIntoInt64());
|
| EXPECT(one.FitsIntoUint64());
|
| @@ -92,6 +104,10 @@ TEST_CASE(BigintUint64) {
|
| }
|
|
|
| TEST_CASE(BigintDouble) {
|
| + if (Bigint::IsDisabled()) {
|
| + return;
|
| + }
|
| +
|
| Bigint& bigint = Bigint::Handle(Bigint::NewFromInt64(5));
|
| EXPECT_EQ(5.0, bigint.AsDoubleValue());
|
|
|
| @@ -224,6 +240,10 @@ TEST_CASE(BigintDouble) {
|
| }
|
|
|
| TEST_CASE(BigintHexStrings) {
|
| + if (Bigint::IsDisabled()) {
|
| + return;
|
| + }
|
| +
|
| Zone* zone = Thread::Current()->zone();
|
| {
|
| const Bigint& bigint = Bigint::Handle(Bigint::NewFromCString("0x0"));
|
| @@ -404,6 +424,10 @@ TEST_CASE(BigintHexStrings) {
|
| }
|
|
|
| TEST_CASE(BigintDecStrings) {
|
| + if (Bigint::IsDisabled()) {
|
| + return;
|
| + }
|
| +
|
| Zone* zone = Thread::Current()->zone();
|
| {
|
| const Bigint& bigint = Bigint::Handle(Bigint::NewFromCString("0x0"));
|
| @@ -528,6 +552,10 @@ static void TestBigintCompare(const char* a, const char* b, int compare) {
|
| }
|
|
|
| TEST_CASE(BigintCompare) {
|
| + if (Bigint::IsDisabled()) {
|
| + return;
|
| + }
|
| +
|
| TestBigintCompare("0x0", "0x0", 0);
|
| TestBigintCompare("0x1", "0x1", 0);
|
| TestBigintCompare("-0x1", "-0x1", 0);
|
| @@ -576,6 +604,10 @@ TEST_CASE(BigintCompare) {
|
| }
|
|
|
| TEST_CASE(BigintDecimalStrings) {
|
| + if (Bigint::IsDisabled()) {
|
| + return;
|
| + }
|
| +
|
| Zone* zone = Thread::Current()->zone();
|
| {
|
| const Bigint& bigint = Bigint::Handle(Bigint::NewFromCString("0"));
|
|
|