| OLD | NEW |
| 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 import 'dart:fletch'; | 5 import 'dart:dartino'; |
| 6 | 6 |
| 7 import 'package:expect/expect.dart'; | 7 import 'package:expect/expect.dart'; |
| 8 | 8 |
| 9 main() { | 9 main() { |
| 10 Expect.equals(42, run(createInt)); | 10 Expect.equals(42, run(createInt)); |
| 11 Expect.equals("fisk", run(createString)); | 11 Expect.equals("fisk", run(createString)); |
| 12 | 12 |
| 13 var list = run(createList); | 13 var list = run(createList); |
| 14 Expect.equals(3, list.length); | 14 Expect.equals(3, list.length); |
| 15 Expect.equals(1, list[0]); | 15 Expect.equals(1, list[0]); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 40 channel.receive().send(fn); | 40 channel.receive().send(fn); |
| 41 return channel.receive(); | 41 return channel.receive(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void helper(Port port) { | 44 void helper(Port port) { |
| 45 Channel channel = new Channel(); | 45 Channel channel = new Channel(); |
| 46 port.send(new Port(channel)); | 46 port.send(new Port(channel)); |
| 47 var fn = channel.receive(); | 47 var fn = channel.receive(); |
| 48 Process.exit(value: fn(), to: port); | 48 Process.exit(value: fn(), to: port); |
| 49 } | 49 } |
| OLD | NEW |