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 import 'dart:fletch'; | 5 import 'dart:dartino'; |
6 | 6 |
7 import 'package:expect/expect.dart'; | 7 import 'package:expect/expect.dart'; |
8 import 'package:isolate/process_runner.dart'; | 8 import 'package:isolate/process_runner.dart'; |
9 | 9 |
10 main() { | 10 main() { |
11 Expect.throws(() => Process.spawn(noarg, 99), (e) => e is ArgumentError); | 11 Expect.throws(() => Process.spawn(noarg, 99), (e) => e is ArgumentError); |
12 Expect.throws(() => Process.spawn(arg), (e) => e is ArgumentError); | 12 Expect.throws(() => Process.spawn(arg), (e) => e is ArgumentError); |
13 Expect.throws(() => Process.spawn(arg, null), (e) => e is ArgumentError); | 13 Expect.throws(() => Process.spawn(arg, null), (e) => e is ArgumentError); |
14 | 14 |
15 withProcessRunner((runner) { | 15 withProcessRunner((runner) { |
(...skipping 11 matching lines...) Expand all Loading... |
27 } | 27 } |
28 | 28 |
29 void arg(arg) { } | 29 void arg(arg) { } |
30 void noarg() { } | 30 void noarg() { } |
31 | 31 |
32 void arg0(arg) => Expect.equals(0, arg); | 32 void arg0(arg) => Expect.equals(0, arg); |
33 void arg42(arg) => Expect.equals(42, arg); | 33 void arg42(arg) => Expect.equals(42, arg); |
34 void arg87([arg = 87]) => Expect.equals(87, arg); | 34 void arg87([arg = 87]) => Expect.equals(87, arg); |
35 | 35 |
36 void argFoo(arg) => Expect.equals('foo', arg); | 36 void argFoo(arg) => Expect.equals('foo', arg); |
OLD | NEW |