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

Side by Side Diff: tests/standalone/medium_integer_test.dart

Issue 10968059: Support for unboxed 64-bit integer bitwise operations and equality on ia32. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments, added tests and flags Created 8 years, 2 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // Testing Mints. Note that the tests may not work on 64-bit machines, 4 // Testing Mints. Note that the tests may not work on 64-bit machines,
5 // as Smi's would be used to represent many of the numbers. 5 // as Smi's would be used to represent many of the numbers.
6 6
7 #library("MediumIntegerTest.dart"); 7 #library("MediumIntegerTest.dart");
8 8
9 9
10 class MediumIntegerTest { 10 class MediumIntegerTest {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 static void testMain() { 92 static void testMain() {
93 Expect.equals(1234567890123456789, getMint()); 93 Expect.equals(1234567890123456789, getMint());
94 testSmiOverflow(); 94 testSmiOverflow();
95 testMintAdd(); 95 testMintAdd();
96 testMintSub(); 96 testMintSub();
97 testMintMul(); 97 testMintMul();
98 testMintDiv(); 98 testMintDiv();
99 testMintAnd(-1925149952); 99 testMintAnd(-1925149952);
100 testMintAnd(1925149952); 100 testMintAnd(1925149952);
101 testMintAnd(0x100000001);
101 var a = 100000000000; 102 var a = 100000000000;
102 var b = 100000000001; 103 var b = 100000000001;
103 Expect.equals(false, a.hashCode() == b.hashCode()); 104 Expect.equals(false, a.hashCode() == b.hashCode());
104 Expect.equals(true, a.hashCode() == (b - 1).hashCode()); 105 Expect.equals(true, a.hashCode() == (b - 1).hashCode());
105 } 106 }
106 } 107 }
107 108
108 main() { 109 main() {
109 for (int i = 0; i < 4000; i++) { 110 for (int i = 0; i < 4000; i++) {
110 MediumIntegerTest.testMain(); 111 MediumIntegerTest.testMain();
111 } 112 }
112 } 113 }
OLDNEW
« tests/language/mint_arithmetic.dart ('K') | « tests/language/mint_arithmetic.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698