| OLD | NEW |
| 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 final x = foo(); | 5 final x = foo(); |
| 8 final y = y2(y3); | 6 final y = y2(y3); |
| 9 final y2 = incrementCreator(); | 7 final y2 = incrementCreator(); |
| 10 final y3 = fib(5); | 8 final y3 = fib(5); |
| 11 | 9 |
| 12 foo() => 499; | 10 foo() => 499; |
| 13 | 11 |
| 14 incrementCreator() => (x) => x + 1; | 12 incrementCreator() => (x) => x + 1; |
| 15 fib(x) { | 13 fib(x) { |
| 16 if (x < 2) return x; | 14 if (x < 2) return x; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 41 main() { | 39 main() { |
| 42 Expect.equals(499, x); | 40 Expect.equals(499, x); |
| 43 Expect.equals(6, y); | 41 Expect.equals(6, y); |
| 44 Expect.equals(666, A.a); | 42 Expect.equals(666, A.a); |
| 45 Expect.equals(119, A.b); | 43 Expect.equals(119, A.b); |
| 46 Expect.equals(0, t); | 44 Expect.equals(0, t); |
| 47 t2 = 499; | 45 t2 = 499; |
| 48 Expect.equals(499, t2); | 46 Expect.equals(499, t2); |
| 49 Expect.equals(1, count); | 47 Expect.equals(1, count); |
| 50 } | 48 } |
| OLD | NEW |