OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 yaml.node_wrapper_test; | 5 library yaml.node_wrapper_test; |
6 | 6 |
7 import 'package:source_maps/source_maps.dart'; | 7 import 'package:source_span/source_span.dart'; |
8 import 'package:unittest/unittest.dart'; | 8 import 'package:unittest/unittest.dart'; |
9 import 'package:yaml/yaml.dart'; | 9 import 'package:yaml/yaml.dart'; |
10 | 10 |
11 main() { | 11 main() { |
12 test("YamlMap() with no sourceUrl", () { | 12 test("YamlMap() with no sourceUrl", () { |
13 var map = new YamlMap(); | 13 var map = new YamlMap(); |
14 expect(map, isEmpty); | 14 expect(map, isEmpty); |
15 expect(map.nodes, isEmpty); | 15 expect(map.nodes, isEmpty); |
16 expect(map.span, isNullSpan(isNull)); | 16 expect(map.span, isNullSpan(isNull)); |
17 }); | 17 }); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 expect(span, new isInstanceOf<SourceSpan>()); | 154 expect(span, new isInstanceOf<SourceSpan>()); |
155 expect(span.length, equals(0)); | 155 expect(span.length, equals(0)); |
156 expect(span.text, isEmpty); | 156 expect(span.text, isEmpty); |
157 expect(span.start, equals(span.end)); | 157 expect(span.start, equals(span.end)); |
158 expect(span.start.offset, equals(0)); | 158 expect(span.start.offset, equals(0)); |
159 expect(span.start.line, equals(0)); | 159 expect(span.start.line, equals(0)); |
160 expect(span.start.column, equals(0)); | 160 expect(span.start.column, equals(0)); |
161 expect(span.sourceUrl, sourceUrl); | 161 expect(span.sourceUrl, sourceUrl); |
162 return true; | 162 return true; |
163 }); | 163 }); |
OLD | NEW |