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

Unified Diff: tests/language/src/BitOperationsVMTest.dart

Issue 9149005: split out vm-specific tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: keeping test closer to original Created 8 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
Index: tests/language/src/BitOperationsVMTest.dart
diff --git a/tests/language/src/BitOperationsTest.dart b/tests/language/src/BitOperationsVMTest.dart
similarity index 89%
copy from tests/language/src/BitOperationsTest.dart
copy to tests/language/src/BitOperationsVMTest.dart
index 2dd0a313fa7fc77d019ef4678b7bc296e176f449..0f78d0c33d019a83e5a1835398611b03d7529fb4 100644
--- a/tests/language/src/BitOperationsTest.dart
+++ b/tests/language/src/BitOperationsVMTest.dart
@@ -2,27 +2,20 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// Dart test for testing bitwise operations.
+// This test includes bitwise operations on very large numbers to test
+// the arbitrary precision integer support in dart.
-class BitOperationsTest {
+class BitOperationsVMTest {
static testMain() {
for (int i = 0; i < 4; i++) {
testOne();
}
}
static testOne() {
- Expect.equals(3, (3 & 7));
- Expect.equals(7, (3 | 7));
- Expect.equals(4, (3 ^ 7));
- Expect.equals(25, (100 >> 2));
- Expect.equals(400, (100 << 2));
- Expect.equals(-25, (-100 >> 2));
- Expect.equals(-101, ~100);
Expect.equals(0x10000000000000000, 1 << 64);
Expect.equals(-0x10000000000000000, -1 << 64);
Expect.equals(0x40000000, 0x04000000 << 4);
Expect.equals(0x4000000000000000, 0x0400000000000000 << 4);
- Expect.equals(0, ~-1);
- Expect.equals(-1, ~0);
Expect.equals(0, 1 >> 160);
Expect.equals(-1, -1 >> 160);
@@ -95,5 +88,5 @@ class BitOperationsTest {
}
main() {
- BitOperationsTest.testMain();
+ BitOperationsVMTest.testMain();
}

Powered by Google App Engine
This is Rietveld 408576698