| OLD | NEW |
| 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; | 7 int one; |
| 6 int x; | 8 int x; |
| 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 one = 1; | 23 one = 1; |
| 22 x = 5; | 24 x = 5; |
| 23 Expect.equals(1, one); | 25 Expect.equals(1, one); |
| 24 testOne(); | 26 testOne(); |
| 25 Expect.equals(5, x); | 27 Expect.equals(5, x); |
| 26 testX(5); | 28 testX(5); |
| 27 x = x + 1; | 29 x = x + 1; |
| 28 Expect.equals(6, x); | 30 Expect.equals(6, x); |
| 29 testX(6); | 31 testX(6); |
| 30 increaseX(); | 32 increaseX(); |
| 31 Expect.equals(7, x); | 33 Expect.equals(7, x); |
| 32 testX(7); | 34 testX(7); |
| 33 } | 35 } |
| OLD | NEW |