| OLD | NEW |
| 1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // FletchOptions=-Xgc-on-delete | 5 // DartinoOptions=-Xgc-on-delete |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:fletch'; | 8 import 'dart:dartino'; |
| 9 | 9 |
| 10 import 'package:expect/expect.dart'; | 10 import 'package:expect/expect.dart'; |
| 11 | 11 |
| 12 List constList = const [1, 2, 3]; | 12 List constList = const [1, 2, 3]; |
| 13 | 13 |
| 14 noop() { } | 14 noop() { } |
| 15 | 15 |
| 16 main() { | 16 main() { |
| 17 var input = new Channel(); | 17 var input = new Channel(); |
| 18 var port = new Port(input); | 18 var port = new Port(input); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 37 replyPort.send(port); | 37 replyPort.send(port); |
| 38 replyPort.send(constList); | 38 replyPort.send(constList); |
| 39 // Spin up a process that will die immediately to force a program GC. | 39 // Spin up a process that will die immediately to force a program GC. |
| 40 Process.spawnDetached(noop); | 40 Process.spawnDetached(noop); |
| 41 Expect.equals(input.receive(), constList); | 41 Expect.equals(input.receive(), constList); |
| 42 for (int i = 0; i < 10; i++) { | 42 for (int i = 0; i < 10; i++) { |
| 43 Process.spawnDetached(noop); | 43 Process.spawnDetached(noop); |
| 44 replyPort.send(i); | 44 replyPort.send(i); |
| 45 } | 45 } |
| 46 } | 46 } |
| OLD | NEW |