Chromium Code Reviews

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated latest tests. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
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 4
5 import "package:expect/expect.dart";
6
5 int one = 1; 7 int one = 1;
6 int x = 5; 8 int x = 5;
7 9
8 void testOne() { 10 void testOne() {
9 Expect.equals(1, one); 11 Expect.equals(1, one);
10 } 12 }
11 13
12 void testX(var expected) { 14 void testX(var expected) {
13 Expect.equals(expected, x); 15 Expect.equals(expected, x);
14 } 16 }
15 17
16 void increaseX() { 18 void increaseX() {
17 x = x + 1; 19 x = x + 1;
18 } 20 }
19 21
20 void main() { 22 void main() {
21 Expect.equals(1, one); 23 Expect.equals(1, one);
22 testOne(); 24 testOne();
23 Expect.equals(5, x); 25 Expect.equals(5, x);
24 testX(5); 26 testX(5);
25 x = x + 1; 27 x = x + 1;
26 Expect.equals(6, x); 28 Expect.equals(6, x);
27 testX(6); 29 testX(6);
28 increaseX(); 30 increaseX();
29 Expect.equals(7, x); 31 Expect.equals(7, x);
30 testX(7); 32 testX(7);
31 } 33 }
OLDNEW

Powered by Google App Engine