| 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 polymer.test.refactor_test; | 5 library polymer.test.refactor_test; |
| 6 | 6 |
| 7 import 'package:unittest/unittest.dart'; | 7 import 'package:test/test.dart'; |
| 8 import 'package:source_maps/refactor.dart'; | 8 import 'package:source_maps/refactor.dart'; |
| 9 import 'package:source_maps/parser.dart' show parse, Mapping; | 9 import 'package:source_maps/parser.dart' show parse, Mapping; |
| 10 import 'package:source_span/source_span.dart'; | 10 import 'package:source_span/source_span.dart'; |
| 11 | 11 |
| 12 main() { | 12 main() { |
| 13 group('conflict detection', () { | 13 group('conflict detection', () { |
| 14 var original = "0123456789abcdefghij"; | 14 var original = "0123456789abcdefghij"; |
| 15 var file = new SourceFile(original); | 15 var file = new SourceFile(original); |
| 16 | 16 |
| 17 test('no conflict, in order', () { | 17 test('no conflict, in order', () { |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 "line 5, column 1: \n" | 140 "line 5, column 1: \n" |
| 141 "abcd*fghij\n" | 141 "abcd*fghij\n" |
| 142 "^"); | 142 "^"); |
| 143 }); | 143 }); |
| 144 } | 144 } |
| 145 | 145 |
| 146 String _span(int line, int column, Mapping map, SourceFile file) { | 146 String _span(int line, int column, Mapping map, SourceFile file) { |
| 147 var span = map.spanFor(line - 1, column - 1, files: {'': file}); | 147 var span = map.spanFor(line - 1, column - 1, files: {'': file}); |
| 148 return span == null ? null : span.message('').trim(); | 148 return span == null ? null : span.message('').trim(); |
| 149 } | 149 } |
| OLD | NEW |