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

Unified Diff: tests/language/src/CompoundAssignmentOperatorTest.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/CompileTimeConstantTest.dart ('k') | tests/language/src/CondExprTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/CompoundAssignmentOperatorTest.dart
diff --git a/tests/language/src/CompoundAssignmentOperatorTest.dart b/tests/language/src/CompoundAssignmentOperatorTest.dart
deleted file mode 100644
index 9ed3e5da5f3086a6875773e56fa094ef9448c219..0000000000000000000000000000000000000000
--- a/tests/language/src/CompoundAssignmentOperatorTest.dart
+++ /dev/null
@@ -1,47 +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.
-// Tests that lhs of a compound assignement is executed only once.
-
-
-class Indexed {
- Indexed() : _f = new List(10), count = 0 {
- _f[0] = 100;
- _f[1] = 200;
- }
- operator [](i) {
- count++;
- return _f;
- }
- var count;
- var _f;
-}
-
-class CompoundAssignmentOperatorTest {
-
- static void testIndexed() {
- Indexed indexed = new Indexed();
- Expect.equals(0, indexed.count);
- var tmp = indexed[0];
- Expect.equals(1, indexed.count);
- Expect.equals(100, indexed[4][0]);
- Expect.equals(2, indexed.count);
- Expect.equals(100, indexed[4][0]++);
- Expect.equals(3, indexed.count);
- Expect.equals(101, indexed[4][0]);
- Expect.equals(4, indexed.count);
- indexed[4][0] += 10;
- Expect.equals(5, indexed.count);
- Expect.equals(111, indexed[4][0]);
- var i = 0;
- indexed[3][i++] += 1;
- Expect.equals(1, i);
- }
-
- static void testMain() {
- testIndexed();
- }
-}
-main() {
- CompoundAssignmentOperatorTest.testMain();
-}
« no previous file with comments | « tests/language/src/CompileTimeConstantTest.dart ('k') | tests/language/src/CondExprTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698