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

Unified Diff: tests/language/src/IncrOpTest.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
« no previous file with comments | « tests/language/src/ImportCoreNoPrefixTest.dart ('k') | tests/language/src/IndexTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/IncrOpTest.dart
diff --git a/tests/language/src/IncrOpTest.dart b/tests/language/src/IncrOpTest.dart
deleted file mode 100644
index a87d3bd712ed14b01dedb23e6d707990b79b8923..0000000000000000000000000000000000000000
--- a/tests/language/src/IncrOpTest.dart
+++ /dev/null
@@ -1,83 +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 increment operator.
-
-class A {
- static var yy;
- static set y(v) {
- yy = v;
- }
-
- static get y() {
- return yy;
- }
-}
-
-class IncrOpTest {
- var x;
- static var y;
-
- IncrOpTest() {}
-
- static testMain() {
- var a = 3;
- var c = a++ + 1;
- Expect.equals(4, c);
- Expect.equals(4, a);
- c = a-- + 1;
- Expect.equals(5, c);
- Expect.equals(3, a);
-
- c = --a + 1;
- Expect.equals(3, c);
- Expect.equals(2, a);
-
- c = 2 + ++a;
- Expect.equals(5, c);
- Expect.equals(3, a);
-
- var obj = new IncrOpTest();
- obj.x = 100;
- Expect.equals(100, obj.x);
- obj.x++;
- Expect.equals(101, obj.x);
- Expect.equals(102, ++obj.x);
- Expect.equals(102, obj.x++);
- Expect.equals(103, obj.x);
-
- A.y = 55;
- Expect.equals(55, A.y++);
- Expect.equals(56, A.y);
- Expect.equals(57, ++A.y);
- Expect.equals(57, A.y);
- Expect.equals(56, --A.y);
-
- IncrOpTest.y = 55;
- Expect.equals(55, IncrOpTest.y++);
- Expect.equals(56, IncrOpTest.y);
- Expect.equals(57, ++IncrOpTest.y);
- Expect.equals(57, IncrOpTest.y);
- Expect.equals(56, --IncrOpTest.y);
-
- var list = new List(4);
- for (int i = 0; i < list.length; i++) {
- list[i] = i;
- }
- for (int i = 0; i < list.length; i++) {
- list[i]++;
- }
- for (int i = 0; i < list.length; i++) {
- Expect.equals(i + 1, list[i]);
- ++list[i];
- }
- Expect.equals(1 + 2, list[1]);
- Expect.equals(1 + 2, list[1]--);
- Expect.equals(1 + 1, list[1]);
- Expect.equals(1 + 0, --list[1]);
- }
-}
-
-main() {
- IncrOpTest.testMain();
-}
« no previous file with comments | « tests/language/src/ImportCoreNoPrefixTest.dart ('k') | tests/language/src/IndexTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698