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

Side by Side Diff: tests/language/operator2_test.dart

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add deprecation comment for ExpectException and revert one test. Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/language/numbers_test.dart ('k') | tests/language/operator3_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // Operator dart test program. 4 // Operator dart test program.
5 5
6 import "package:expect/expect.dart";
7
6 class Helper { 8 class Helper {
7 int i; 9 int i;
8 Helper(int val) : i = val { } 10 Helper(int val) : i = val { }
9 operator [](int index) { 11 operator [](int index) {
10 return i + index; 12 return i + index;
11 } 13 }
12 void operator []=(int index, int val) { 14 void operator []=(int index, int val) {
13 i = val; 15 i = val;
14 } 16 }
15 } 17 }
16 18
17 class OperatorTest { 19 class OperatorTest {
18 static testMain() { 20 static testMain() {
19 Helper obj = new Helper(10); 21 Helper obj = new Helper(10);
20 Expect.equals(10, obj.i); 22 Expect.equals(10, obj.i);
21 obj[10] = 20; 23 obj[10] = 20;
22 Expect.equals(30, obj[10]); 24 Expect.equals(30, obj[10]);
23 } 25 }
24 } 26 }
25 27
26 28
27 main() { 29 main() {
28 OperatorTest.testMain(); 30 OperatorTest.testMain();
29 } 31 }
OLDNEW
« no previous file with comments | « tests/language/numbers_test.dart ('k') | tests/language/operator3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698