| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:io'; | 6 import 'dart:io'; |
| 7 | 7 |
| 8 import "package:async_helper/async_helper.dart"; | 8 import "package:async_helper/async_helper.dart"; |
| 9 import "package:expect/expect.dart"; | 9 import "package:expect/expect.dart"; |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 completer.complete(true); | 63 completer.complete(true); |
| 64 }); | 64 }); |
| 65 }); | 65 }); |
| 66 }); | 66 }); |
| 67 }); | 67 }); |
| 68 return completer.future; | 68 return completer.future; |
| 69 } | 69 } |
| 70 | 70 |
| 71 main() { | 71 main() { |
| 72 asyncStart(); | 72 asyncStart(); |
| 73 var tempDir = new Directory('').createTempSync(); | 73 var tempDir = Directory.systemTemp.createTempSync('dart_file_write_as'); |
| 74 testWriteAsBytesSync(tempDir); | 74 testWriteAsBytesSync(tempDir); |
| 75 testWriteAsStringSync(tempDir); | 75 testWriteAsStringSync(tempDir); |
| 76 testWriteAsBytes(tempDir).then((_) { | 76 testWriteAsBytes(tempDir).then((_) { |
| 77 return testWriteAsString(tempDir); | 77 return testWriteAsString(tempDir); |
| 78 }).then((_) { | 78 }).then((_) { |
| 79 tempDir.deleteSync(recursive: true); | 79 tempDir.deleteSync(recursive: true); |
| 80 asyncEnd(); | 80 asyncEnd(); |
| 81 }); | 81 }); |
| 82 } | 82 } |
| OLD | NEW |