| 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 break at a breakpoint hit by another process than main. | 5 // Test that we can break at a breakpoint hit by another process than main. |
| 6 | 6 |
| 7 // DartinoDebuggerCommands=b foo,r,bt,c | 7 // DartinoDebuggerCommands=b foo,r,bt,c,q |
| 8 | 8 |
| 9 import 'dart:dartino'; | 9 import 'dart:dartino'; |
| 10 import 'package:expect/expect.dart'; | 10 import 'package:expect/expect.dart'; |
| 11 | 11 |
| 12 int foo() => 42; | 12 int foo() => 42; |
| 13 | 13 |
| 14 other(Port port) { | 14 other(Port port) { |
| 15 port.send(foo()); | 15 port.send(foo()); |
| 16 } | 16 } |
| 17 | 17 |
| 18 main() { | 18 main() { |
| 19 var channel = new Channel(); | 19 var channel = new Channel(); |
| 20 var port = new Port(channel); | 20 var port = new Port(channel); |
| 21 Process.spawnDetached(() { other(port); }); | 21 Process.spawnDetached(() { other(port); }); |
| 22 Expect.equals(42, channel.receive()); | 22 Expect.equals(42, channel.receive()); |
| 23 } | 23 } |
| OLD | NEW |