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

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

Issue 10248007: test rename overhaul: step 8 - language tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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/AssignOpTest.dart
diff --git a/tests/language/src/AssignOpTest.dart b/tests/language/src/AssignOpTest.dart
deleted file mode 100644
index 440eaa8bb150aaefaa50dd719794b64273db9c20..0000000000000000000000000000000000000000
--- a/tests/language/src/AssignOpTest.dart
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// 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 program for testing assign operators.
-
-
-class AssignOpTest {
- AssignOpTest() {}
-
- static testMain() {
- var b = 0;
- b += 1;
- Expect.equals(1, b);
- b *= 5;
- Expect.equals(5, b);
- b -= 1;
- Expect.equals(4, b);
- b ~/= 2;
- Expect.equals(2, b);
-
- f = 0;
- f += 1;
- Expect.equals(1, f);
- f *= 5;
- Expect.equals(5, f);
- f -= 1;
- Expect.equals(4, f);
- f ~/= 2;
- Expect.equals(2, f);
- f /= 4;
- Expect.equals(.5, f);
-
- AssignOpTest.f = 0;
- AssignOpTest.f += 1;
- Expect.equals(1, AssignOpTest.f);
- AssignOpTest.f *= 5;
- Expect.equals(5, AssignOpTest.f);
- AssignOpTest.f -= 1;
- Expect.equals(4, AssignOpTest.f);
- AssignOpTest.f ~/= 2;
- Expect.equals(2, AssignOpTest.f);
- AssignOpTest.f /= 4;
- Expect.equals(.5, f);
-
- var o = new AssignOpTest();
- o.instf = 0;
- o.instf += 1;
- Expect.equals(1, o.instf);
- o.instf *= 5;
- Expect.equals(5, o.instf);
- o.instf -= 1;
- Expect.equals(4, o.instf);
- o.instf ~/= 2;
- Expect.equals(2, o.instf);
- o.instf /= 4;
- Expect.equals(.5, o.instf);
-
- var x = 0xFF;
- x >>= 3;
- Expect.equals(0x1F, x);
- x <<= 3;
- Expect.equals(0xF8, x);
- x |= 0xF00;
- Expect.equals(0xFF8, x);
- x &=0xF0;
- Expect.equals(0xF0, x);
- x ^=0x11;
- Expect.equals(0xE1, x);
-
- var y = 100;
- y += 1 << 3;
- Expect.equals(108, y);
- y *= 2 + 1;
- Expect.equals(324, y);
- y -= 3 - 2;
- Expect.equals(323, y);
- y += 3 * 4;
- Expect.equals(335, y);
-
- var a = [1, 2, 3];
- var ix = 0;
- a[ix] |= 12;
- Expect.equals(13, a[ix]);
- }
-
- static var f;
- var instf;
-}
-main() {
- for (int i = 0; i < 2000; i++) {
- AssignOpTest.testMain();
- }
-}
« no previous file with comments | « tests/language/src/AssignInstanceMethodNegativeTest.dart ('k') | tests/language/src/AssignStaticTypeTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698