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

Side by Side Diff: tests/compiler/dart2js_extra/compound_operator_index_test.dart

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 years, 9 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 4
5 import "package:expect/expect.dart";
6
7 class A { 5 class A {
8 List<int> list; 6 List<int> list;
9 A(int a, int b) : list = <int>[a, b]; 7 A(int a, int b) : list = <int>[a, b];
10 operator [](index) => list[index]; 8 operator [](index) => list[index];
11 operator []=(index, value) => list[index] = value; 9 operator []=(index, value) => list[index] = value;
12 } 10 }
13 11
14 class B { 12 class B {
15 int value; 13 int value;
16 List trace; 14 List trace;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 Expect.equals(1, a[0]); 64 Expect.equals(1, a[0]);
67 65
68 a[0] += 2; 66 a[0] += 2;
69 Expect.equals(3, a[0]); 67 Expect.equals(3, a[0]);
70 68
71 List trace = new List(); 69 List trace = new List();
72 getB(trace)[getIndex(trace)] += 37; 70 getB(trace)[getIndex(trace)] += 37;
73 71
74 Expect.listEquals([-1, -2, -3, 42, 100, -4, 101, 37, -5, 42, 102], trace); 72 Expect.listEquals([-1, -2, -3, 42, 100, -4, 101, 37, -5, 42, 102], trace);
75 } 73 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js_extra/compile_time_constant4_test.dart ('k') | tests/compiler/dart2js_extra/conditional_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698