Fix lingering references to the old Span in yaml. R=rnystrom@google.com BUG= Review URL: https://codereview.chromium.org//413403002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/yaml@38656 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/pkgs/yaml/CHANGELOG.md b/pkgs/yaml/CHANGELOG.md index 94c8807..0c8ed7b 100644 --- a/pkgs/yaml/CHANGELOG.md +++ b/pkgs/yaml/CHANGELOG.md
@@ -1,3 +1,8 @@ +## 2.0.1 + +* Fix a few lingering references to the old `Span` class in documentation and + tests. + ## 2.0.0 * Switch from `source_maps`' `Span` class to `source_span`'s `SourceSpan` class.
diff --git a/pkgs/yaml/lib/src/null_span.dart b/pkgs/yaml/lib/src/null_span.dart index 1054df1..06b42f0 100644 --- a/pkgs/yaml/lib/src/null_span.dart +++ b/pkgs/yaml/lib/src/null_span.dart
@@ -6,7 +6,7 @@ import 'package:source_span/source_span.dart'; -/// A [Span] with no location information. +/// A [SourceSpan] with no location information. /// /// This is used with [YamlMap.wrap] and [YamlList.wrap] to provide means of /// accessing a non-YAML map that behaves transparently like a map parsed from
diff --git a/pkgs/yaml/lib/src/yaml_node.dart b/pkgs/yaml/lib/src/yaml_node.dart index 4f77060..6320156 100644 --- a/pkgs/yaml/lib/src/yaml_node.dart +++ b/pkgs/yaml/lib/src/yaml_node.dart
@@ -117,7 +117,7 @@ /// Any [SourceSpan]s returned by this list or its children will be dummies /// without useful location information. However, they will have a reasonable /// implementation of [SourceSpan.getLocationMessage]. If [sourceUrl] is - /// passed, it's used as the [Span.sourceUrl]. + /// passed, it's used as the [SourceSpan.sourceUrl]. /// /// [sourceUrl] may be either a [String], a [Uri], or `null`. factory YamlList.wrap(List dartList, {sourceUrl}) => @@ -144,7 +144,7 @@ /// /// This scalar's [span] won't have useful location information. However, it /// will have a reasonable implementation of [SourceSpan.message]. If - /// [sourceUrl] is passed, it's used as the [Span.sourceUrl]. + /// [sourceUrl] is passed, it's used as the [SourceSpan.sourceUrl]. /// /// [sourceUrl] may be either a [String], a [Uri], or `null`. YamlScalar.wrap(this.value, {sourceUrl})
diff --git a/pkgs/yaml/pubspec.yaml b/pkgs/yaml/pubspec.yaml index 470bc2f..f9f784c 100644 --- a/pkgs/yaml/pubspec.yaml +++ b/pkgs/yaml/pubspec.yaml
@@ -1,5 +1,5 @@ name: yaml -version: 2.0.0 +version: 2.0.1 author: "Dart Team <misc@dartlang.org>" homepage: http://www.dartlang.org description: A parser for YAML.
diff --git a/pkgs/yaml/test/yaml_node_wrapper_test.dart b/pkgs/yaml/test/yaml_node_wrapper_test.dart index 7d4faa6..712eeee 100644 --- a/pkgs/yaml/test/yaml_node_wrapper_test.dart +++ b/pkgs/yaml/test/yaml_node_wrapper_test.dart
@@ -18,7 +18,7 @@ test("YamlMap() with a sourceUrl", () { var map = new YamlMap(sourceUrl: "source"); - expect(map.span, isNullSpan("source")); + expect(map.span, isNullSpan(Uri.parse("source"))); }); test("YamlList() with no sourceUrl", () { @@ -30,7 +30,7 @@ test("YamlList() with a sourceUrl", () { var list = new YamlList(sourceUrl: "source"); - expect(list.span, isNullSpan("source")); + expect(list.span, isNullSpan(Uri.parse("source"))); }); test("YamlMap.wrap() with no sourceUrl", () { @@ -79,10 +79,11 @@ "scalar": "value" }, sourceUrl: "source"); - expect(map.span, isNullSpan("source")); - expect(map["list"].span, isNullSpan("source")); - expect(map["map"].span, isNullSpan("source")); - expect(map.nodes["scalar"].span, isNullSpan("source")); + var source = Uri.parse("source"); + expect(map.span, isNullSpan(source)); + expect(map["list"].span, isNullSpan(source)); + expect(map["map"].span, isNullSpan(source)); + expect(map.nodes["scalar"].span, isNullSpan(source)); }); test("YamlList.wrap() with no sourceUrl", () { @@ -134,7 +135,7 @@ expect(list.nodes[2].span, isNullSpan(isNull)); }); - solo_test("re-wrapped objects equal one another", () { + test("re-wrapped objects equal one another", () { var list = new YamlList.wrap([ [1, 2, 3], {"foo": "bar"} @@ -150,10 +151,9 @@ } Matcher isNullSpan(sourceUrl) => predicate((span) { - expect(span, new isInstanceOf<Span>()); + expect(span, new isInstanceOf<SourceSpan>()); expect(span.length, equals(0)); expect(span.text, isEmpty); - expect(span.isIdentifier, isFalse); expect(span.start, equals(span.end)); expect(span.start.offset, equals(0)); expect(span.start.line, equals(0));