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

Side by Side Diff: runtime/vm/bigint_operations_test.cc

Issue 18153002: Remove obsolete #ifdefs excluding MIPS target. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/compiler_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/bigint_operations.h" 6 #include "vm/bigint_operations.h"
7 #include "vm/object.h" 7 #include "vm/object.h"
8 #include "vm/object_store.h" 8 #include "vm/object_store.h"
9 #include "vm/unit_test.h" 9 #include "vm/unit_test.h"
10 10
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 TestBigintBitNot("0x50000000", "-0x50000001"); 1333 TestBigintBitNot("0x50000000", "-0x50000001");
1334 TestBigintBitNot("0xFFFFFFF", "-0x10000000"); 1334 TestBigintBitNot("0xFFFFFFF", "-0x10000000");
1335 TestBigintBitNot("0xFFFFFFFF", "-0x100000000"); 1335 TestBigintBitNot("0xFFFFFFFF", "-0x100000000");
1336 TestBigintBitNot("0xFFFFFFFFFFFFFF", "-0x100000000000000"); 1336 TestBigintBitNot("0xFFFFFFFFFFFFFF", "-0x100000000000000");
1337 TestBigintBitNot("0xFFFFFFFFFFFFFFFF", "-0x10000000000000000"); 1337 TestBigintBitNot("0xFFFFFFFFFFFFFFFF", "-0x10000000000000000");
1338 TestBigintBitNot("0x1234567890ABCDEF012345678", 1338 TestBigintBitNot("0x1234567890ABCDEF012345678",
1339 "-0x1234567890ABCDEF012345679"); 1339 "-0x1234567890ABCDEF012345679");
1340 } 1340 }
1341 1341
1342 1342
1343 #if defined(TARGET_ARCH_IA32) || \
1344 defined(TARGET_ARCH_X64) || \
1345 defined(TARGET_ARCH_ARM)
1346 static void TestBigintMultiplyDivide(const char* a, 1343 static void TestBigintMultiplyDivide(const char* a,
1347 const char* b, 1344 const char* b,
1348 const char* product) { 1345 const char* product) {
1349 const Bigint& bigint_a = Bigint::Handle(BigintOperations::NewFromCString(a)); 1346 const Bigint& bigint_a = Bigint::Handle(BigintOperations::NewFromCString(a));
1350 const Bigint& bigint_b = Bigint::Handle(BigintOperations::NewFromCString(b)); 1347 const Bigint& bigint_b = Bigint::Handle(BigintOperations::NewFromCString(b));
1351 const Bigint& computed_product = 1348 const Bigint& computed_product =
1352 Bigint::Handle(BigintOperations::Multiply(bigint_a, bigint_b)); 1349 Bigint::Handle(BigintOperations::Multiply(bigint_a, bigint_b));
1353 const char* str_product = BigintOperations::ToHexCString(computed_product, 1350 const char* str_product = BigintOperations::ToHexCString(computed_product,
1354 &ZoneAllocator); 1351 &ZoneAllocator);
1355 EXPECT_STREQ(product, str_product); 1352 EXPECT_STREQ(product, str_product);
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
2127 "000000000000000000000000000000000000000000000000000000000000000000000000" 2124 "000000000000000000000000000000000000000000000000000000000000000000000000"
2128 "000000000000000000000000000000000000000000000000000000000000000000000000" 2125 "000000000000000000000000000000000000000000000000000000000000000000000000"
2129 "000000000000000000000000000000000000000000000000000000000000000000000000" 2126 "000000000000000000000000000000000000000000000000000000000000000000000000"
2130 "000000000000000000000000000000000000000000000000000000000000000000000000" 2127 "000000000000000000000000000000000000000000000000000000000000000000000000"
2131 "000000000000000000000000000000000000000000000000000000000000000000000000" 2128 "000000000000000000000000000000000000000000000000000000000000000000000000"
2132 "000000000000000000000000000000000000000000000000000000000000000000000000" 2129 "000000000000000000000000000000000000000000000000000000000000000000000000"
2133 "000000000000000000000000000000000000000000000000000000000000000000000000" 2130 "000000000000000000000000000000000000000000000000000000000000000000000000"
2134 "000000000000000000000000000000000000000000000000000000000000000000000000" 2131 "000000000000000000000000000000000000000000000000000000000000000000000000"
2135 "0000000000000000000000000000000000000000000000000000000001"); 2132 "0000000000000000000000000000000000000000000000000000000001");
2136 } 2133 }
2137 #endif
2138 2134
2139 2135
2140 static void TestBigintDivideRemainder(const char* a, 2136 static void TestBigintDivideRemainder(const char* a,
2141 const char* b, 2137 const char* b,
2142 const char* quotient, 2138 const char* quotient,
2143 const char* remainder) { 2139 const char* remainder) {
2144 const Bigint& bigint_a = Bigint::Handle(BigintOperations::NewFromCString(a)); 2140 const Bigint& bigint_a = Bigint::Handle(BigintOperations::NewFromCString(a));
2145 const Bigint& bigint_b = Bigint::Handle(BigintOperations::NewFromCString(b)); 2141 const Bigint& bigint_b = Bigint::Handle(BigintOperations::NewFromCString(b));
2146 const Bigint& computed_quotient = 2142 const Bigint& computed_quotient =
2147 Bigint::Handle(BigintOperations::Divide(bigint_a, bigint_b)); 2143 Bigint::Handle(BigintOperations::Divide(bigint_a, bigint_b));
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
2227 "123456789012345678901234567890123456789012345678901234567890123456789012" 2223 "123456789012345678901234567890123456789012345678901234567890123456789012"
2228 "345678901234567890123456789012345678901234567890123456789012345678901234" 2224 "345678901234567890123456789012345678901234567890123456789012345678901234"
2229 "567890123456789012345678901234567890123456789012345678901234567890123456" 2225 "567890123456789012345678901234567890123456789012345678901234567890123456"
2230 "789012345678901234567890123456789012345678901234567890123456789012345678" 2226 "789012345678901234567890123456789012345678901234567890123456789012345678"
2231 "90123456789012345678901234567890", 2227 "90123456789012345678901234567890",
2232 "0x1234567890ABCDEF01234567890ABCDEF01234567890ABCDEF01234567890ABCDEF" 2228 "0x1234567890ABCDEF01234567890ABCDEF01234567890ABCDEF01234567890ABCDEF"
2233 "01234567890ABCDEE"); 2229 "01234567890ABCDEE");
2234 } 2230 }
2235 2231
2236 } // namespace dart 2232 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/compiler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698