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 import 'dart:io'; | 5 import 'dart:io'; |
6 | 6 |
7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
8 import 'package:analyzer/src/generated/ast.dart'; | 8 import 'package:analyzer/src/generated/ast.dart'; |
| 9 import 'package:collection/collection.dart'; |
9 import 'package:path/path.dart' as p; | 10 import 'package:path/path.dart' as p; |
10 import 'package:source_span/source_span.dart'; | 11 import 'package:source_span/source_span.dart'; |
11 | 12 |
12 import '../backend/metadata.dart'; | 13 import '../backend/metadata.dart'; |
13 import '../backend/platform_selector.dart'; | 14 import '../backend/platform_selector.dart'; |
14 import '../frontend/timeout.dart'; | 15 import '../frontend/timeout.dart'; |
15 import '../util/dart.dart'; | 16 import '../util/dart.dart'; |
16 import '../utils.dart'; | 17 import '../utils.dart'; |
17 | 18 |
18 /// Parse the test metadata for the test file at [path]. | 19 /// Parse the test metadata for the test file at [path]. |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 return fn(); | 539 return fn(); |
539 } on SourceSpanFormatException catch (error) { | 540 } on SourceSpanFormatException catch (error) { |
540 var file = new SourceFile(new File(_path).readAsStringSync(), | 541 var file = new SourceFile(new File(_path).readAsStringSync(), |
541 url: p.toUri(_path)); | 542 url: p.toUri(_path)); |
542 var span = contextualizeSpan(error.span, literal, file); | 543 var span = contextualizeSpan(error.span, literal, file); |
543 if (span == null) rethrow; | 544 if (span == null) rethrow; |
544 throw new SourceSpanFormatException(error.message, span); | 545 throw new SourceSpanFormatException(error.message, span); |
545 } | 546 } |
546 } | 547 } |
547 } | 548 } |
OLD | NEW |