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