| 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.directory; | 5 library descriptor.directory; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import 'package:path/path.dart' as p; | 10 import 'package:path/path.dart' as p; |
| 11 import 'package:stack_trace/stack_trace.dart'; | |
| 12 | 11 |
| 13 import '../../descriptor.dart'; | 12 import '../../descriptor.dart'; |
| 14 import '../../scheduled_test.dart'; | 13 import '../../scheduled_test.dart'; |
| 15 import '../utils.dart'; | 14 import '../utils.dart'; |
| 16 | 15 |
| 17 /// A descriptor describing a directory containing multiple files. | 16 /// A descriptor describing a directory containing multiple files. |
| 18 class DirectoryDescriptor extends Descriptor implements LoadableDescriptor { | 17 class DirectoryDescriptor extends Descriptor implements LoadableDescriptor { |
| 19 /// The entries contained within this directory. This is intentionally | 18 /// The entries contained within this directory. This is intentionally |
| 20 /// mutable. | 19 /// mutable. |
| 21 final List<Descriptor> contents; | 20 final List<Descriptor> contents; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 144 |
| 146 _DirectoryValidationError(Iterable errors) | 145 _DirectoryValidationError(Iterable errors) |
| 147 : errors = errors.map((e) => e.toString()).toList(); | 146 : errors = errors.map((e) => e.toString()).toList(); |
| 148 | 147 |
| 149 String toString() { | 148 String toString() { |
| 150 if (errors.length == 1) return errors.single; | 149 if (errors.length == 1) return errors.single; |
| 151 return errors.map((e) => prefixLines(e, prefix: ' ', firstPrefix: '* ')) | 150 return errors.map((e) => prefixLines(e, prefix: ' ', firstPrefix: '* ')) |
| 152 .join('\n'); | 151 .join('\n'); |
| 153 } | 152 } |
| 154 } | 153 } |
| OLD | NEW |