| OLD | NEW |
| 1 // Copyright (c) 2016, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 // Test that we can set a breakpoint in the body of an anonymous function. | 5 // Test that we can set a breakpoint in the body of an anonymous function. |
| 6 | 6 |
| 7 // DartinoDebuggerCommands=bf tests/debugger/break_in_anonymous_function_test.da
rt 12,bf tests/debugger/break_in_anonymous_function_test.dart 17,bf tests/debugg
er/break_in_anonymous_function_test.dart 19,r,c,c,c | 7 // DartinoDebuggerCommands=bf tests/debugger/break_in_anonymous_function_test.da
rt 12,bf tests/debugger/break_in_anonymous_function_test.dart 17,bf tests/debugg
er/break_in_anonymous_function_test.dart 19,r,c,c,c,q |
| 8 | 8 |
| 9 import 'package:expect/expect.dart'; | 9 import 'package:expect/expect.dart'; |
| 10 | 10 |
| 11 var foo = () { | 11 var foo = () { |
| 12 return 1 + 2 + 3; | 12 return 1 + 2 + 3; |
| 13 }; | 13 }; |
| 14 | 14 |
| 15 main() { | 15 main() { |
| 16 var local = (i) { | 16 var local = (i) { |
| 17 Expect.equals(3, i); | 17 Expect.equals(3, i); |
| 18 return (j) { | 18 return (j) { |
| 19 Expect.equals(5, j); | 19 Expect.equals(5, j); |
| 20 return 42; | 20 return 42; |
| 21 }(i + 2); | 21 }(i + 2); |
| 22 }; | 22 }; |
| 23 Expect.equals(6, foo()); | 23 Expect.equals(6, foo()); |
| 24 Expect.equals(42, local(3)); | 24 Expect.equals(42, local(3)); |
| 25 } | 25 } |
| OLD | NEW |