| 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 test.runner.parse_metadata; | |
| 6 | |
| 7 import 'dart:io'; | 5 import 'dart:io'; |
| 8 | 6 |
| 9 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
| 10 import 'package:analyzer/src/generated/ast.dart'; | 8 import 'package:analyzer/src/generated/ast.dart'; |
| 11 import 'package:path/path.dart' as p; | 9 import 'package:path/path.dart' as p; |
| 12 import 'package:source_span/source_span.dart'; | 10 import 'package:source_span/source_span.dart'; |
| 13 | 11 |
| 14 import '../backend/metadata.dart'; | 12 import '../backend/metadata.dart'; |
| 15 import '../backend/platform_selector.dart'; | 13 import '../backend/platform_selector.dart'; |
| 16 import '../frontend/timeout.dart'; | 14 import '../frontend/timeout.dart'; |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 return fn(); | 533 return fn(); |
| 536 } on SourceSpanFormatException catch (error) { | 534 } on SourceSpanFormatException catch (error) { |
| 537 var file = new SourceFile(new File(_path).readAsStringSync(), | 535 var file = new SourceFile(new File(_path).readAsStringSync(), |
| 538 url: p.toUri(_path)); | 536 url: p.toUri(_path)); |
| 539 var span = contextualizeSpan(error.span, literal, file); | 537 var span = contextualizeSpan(error.span, literal, file); |
| 540 if (span == null) rethrow; | 538 if (span == null) rethrow; |
| 541 throw new SourceSpanFormatException(error.message, span); | 539 throw new SourceSpanFormatException(error.message, span); |
| 542 } | 540 } |
| 543 } | 541 } |
| 544 } | 542 } |
| OLD | NEW |