| 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 library descriptor_test; | 5 library descriptor_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import '../../../pkg/pathos/lib/path.dart' as path; | 10 import 'package:pathos/path.dart' as path; |
| 11 import '../lib/descriptor.dart' as d; | 11 import 'package:scheduled_test/descriptor.dart' as d; |
| 12 import '../lib/scheduled_test.dart'; | 12 import 'package:scheduled_test/scheduled_test.dart'; |
| 13 | 13 |
| 14 import 'metatest.dart'; | 14 import 'metatest.dart'; |
| 15 import 'utils.dart'; | 15 import 'utils.dart'; |
| 16 | 16 |
| 17 String sandbox; | 17 String sandbox; |
| 18 | 18 |
| 19 void main() { | 19 void main() { |
| 20 expectTestsPass('file().create() creates a file', () { | 20 expectTestsPass('file().create() creates a file', () { |
| 21 test('test', () { | 21 test('test', () { |
| 22 scheduleSandbox(); | 22 scheduleSandbox(); |
| (...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 | 964 |
| 965 Future<List<int>> byteStreamToList(Stream<List<int>> stream) { | 965 Future<List<int>> byteStreamToList(Stream<List<int>> stream) { |
| 966 return stream.reduce(<int>[], (buffer, chunk) { | 966 return stream.reduce(<int>[], (buffer, chunk) { |
| 967 buffer.addAll(chunk); | 967 buffer.addAll(chunk); |
| 968 return buffer; | 968 return buffer; |
| 969 }); | 969 }); |
| 970 } | 970 } |
| 971 | 971 |
| 972 Future<String> byteStreamToString(Stream<List<int>> stream) => | 972 Future<String> byteStreamToString(Stream<List<int>> stream) => |
| 973 byteStreamToList(stream).then((bytes) => new String.fromCharCodes(bytes)); | 973 byteStreamToList(stream).then((bytes) => new String.fromCharCodes(bytes)); |
| OLD | NEW |