Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart 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 file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library dart.pkg.isolate.isolaterunner_test; | 5 library dart.pkg.isolate.isolaterunner_test; |
| 6 | 6 |
| 7 import "package:isolate/isolaterunner.dart"; | 7 import "package:isolate/isolaterunner.dart"; |
| 8 import "package:unittest/unittest.dart"; | 8 import "package:unittest/unittest.dart"; |
| 9 import "dart:async" show Future; | 9 import "dart:async" show Future; |
| 10 import "dart:isolate" show Capability; | 10 import "dart:isolate" show Capability; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 return IsolateRunner.spawn().then((isolate) { | 104 return IsolateRunner.spawn().then((isolate) { |
| 105 return isolate.kill(); | 105 return isolate.kill(); |
| 106 }); | 106 }); |
| 107 }); | 107 }); |
| 108 } | 108 } |
| 109 | 109 |
| 110 id(x) => x; | 110 id(x) => x; |
| 111 | 111 |
| 112 var _global; | 112 var _global; |
| 113 getGlobal(_) => _global; | 113 getGlobal(_) => _global; |
| 114 void setGlobal(v) => _global = v; | 114 setGlobal(v) => _global = v; |
|
Lasse Reichstein Nielsen
2015/03/24 10:41:23
I prefer
void setGlobal(v) { _global = v; }
kevmoo
2015/03/24 13:10:29
No you don't. A test fails if it doesn't return th
Lasse Reichstein Nielsen
2015/03/24 18:38:11
Ack, a "setter" with a meaningful return value.
M
| |
| OLD | NEW |