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 test.parser_test; | 5 library test.parser_test; |
6 | 6 |
7 import 'dart:convert'; | 7 import 'dart:convert'; |
8 import 'package:unittest/unittest.dart'; | 8 import 'package:unittest/unittest.dart'; |
9 import 'package:source_maps/source_maps.dart'; | 9 import 'package:source_maps/source_maps.dart'; |
10 import 'common.dart'; | 10 import 'common.dart'; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 expect(map.lines.length, 1); | 92 expect(map.lines.length, 1); |
93 expect(map.lines.first.entries.length, 1); | 93 expect(map.lines.first.entries.length, 1); |
94 TargetEntry entry = map.lines.first.entries.first; | 94 TargetEntry entry = map.lines.first.entries.first; |
95 | 95 |
96 expect(entry.sourceUrlId, 0); | 96 expect(entry.sourceUrlId, 0); |
97 expect(entry.sourceUrlId, 0); | 97 expect(entry.sourceUrlId, 0); |
98 expect(entry.sourceColumn, 0); | 98 expect(entry.sourceColumn, 0); |
99 expect(entry.sourceLine, 0); | 99 expect(entry.sourceLine, 0); |
100 expect(entry.sourceNameId, 0); | 100 expect(entry.sourceNameId, 0); |
101 }); | 101 }); |
| 102 |
| 103 test('parse and re-emit', () { |
| 104 for (var expected in [ |
| 105 EXPECTED_MAP, |
| 106 MAP_WITH_NO_SOURCE_LOCATION, |
| 107 MAP_WITH_SOURCE_LOCATION, |
| 108 MAP_WITH_SOURCE_LOCATION_AND_NAME]) { |
| 109 var mapping = parseJson(expected); |
| 110 expect(mapping.toJson(), equals(expected)); |
| 111 } |
| 112 }); |
102 } | 113 } |
OLD | NEW |