Uncomment some tests (dart-lang/yaml#145)
These tests had been commented out since the original commit in this
repo even though most of them would pass.
With these tests commented out the suite has an empty `group` which may
become disallowed.
https://github.com/dart-lang/test/issues/1961
Change double quotes to single quotes.
Skip a test which is currently failing due to an error parsing a float
value with a single digit.
diff --git a/pkgs/yaml/CHANGELOG.md b/pkgs/yaml/CHANGELOG.md
index 2a78ef9..69a6c9f 100644
--- a/pkgs/yaml/CHANGELOG.md
+++ b/pkgs/yaml/CHANGELOG.md
@@ -1,3 +1,5 @@
+## 3.1.3-wip
+
## 3.1.2
* Require Dart 2.19
diff --git a/pkgs/yaml/pubspec.yaml b/pkgs/yaml/pubspec.yaml
index a3290e1..1671b26 100644
--- a/pkgs/yaml/pubspec.yaml
+++ b/pkgs/yaml/pubspec.yaml
@@ -1,5 +1,5 @@
name: yaml
-version: 3.1.2
+version: 3.1.3-wip
description: A parser for YAML, a human-friendly data serialization standard
repository: https://github.com/dart-lang/yaml
topics:
diff --git a/pkgs/yaml/test/yaml_test.dart b/pkgs/yaml/test/yaml_test.dart
index d226924..bb35ba4 100644
--- a/pkgs/yaml/test/yaml_test.dart
+++ b/pkgs/yaml/test/yaml_test.dart
@@ -1804,70 +1804,66 @@
});
group('10.2: JSON Schema', () {
- // test('[Example 10.4]', () {
- // var doc = deepEqualsMap({"key with null value": null});
- // doc[null] = "value for null key";
- // expectYamlStreamLoads(doc,
- // """
- // !!null null: value for null key
- // key with null value: !!null null""");
- // });
+ test('[Example 10.4]', () {
+ var doc = deepEqualsMap({'key with null value': null});
+ doc[null] = 'value for null key';
+ expectYamlStreamLoads([doc], '''
+ !!null null: value for null key
+ key with null value: !!null null''');
+ });
- // test('[Example 10.5]', () {
- // expectYamlStreamLoads({
- // "YAML is a superset of JSON": true,
- // "Pluto is a planet": false
- // },
- // """
- // YAML is a superset of JSON: !!bool true
- // Pluto is a planet: !!bool false""");
- // });
+ test('[Example 10.5]', () {
+ expectYamlStreamLoads([
+ {'YAML is a superset of JSON': true, 'Pluto is a planet': false}
+ ], '''
+ YAML is a superset of JSON: !!bool true
+ Pluto is a planet: !!bool false''');
+ });
- // test('[Example 10.6]', () {
- // expectYamlStreamLoads({
- // "negative": -12,
- // "zero": 0,
- // "positive": 34
- // },
- // """
- // negative: !!int -12
- // zero: !!int 0
- // positive: !!int 34""");
- // });
+ test('[Example 10.6]', () {
+ expectYamlStreamLoads([
+ {'negative': -12, 'zero': 0, 'positive': 34}
+ ], '''
+ negative: !!int -12
+ zero: !!int 0
+ positive: !!int 34''');
+ });
- // test('[Example 10.7]', () {
- // expectYamlStreamLoads({
- // "negative": -1,
- // "zero": 0,
- // "positive": 23000,
- // "infinity": infinity,
- // "not a number": nan
- // },
- // """
- // negative: !!float -1
- // zero: !!float 0
- // positive: !!float 2.3e4
- // infinity: !!float .inf
- // not a number: !!float .nan""");
- // });
+ test('[Example 10.7]', () {
+ expectYamlStreamLoads([
+ {
+ 'negative': -1,
+ 'zero': 0,
+ 'positive': 23000,
+ 'infinity': infinity,
+ 'not a number': nan
+ }
+ ], '''
+ negative: !!float -1
+ zero: !!float 0
+ positive: !!float 2.3e4
+ infinity: !!float .inf
+ not a number: !!float .nan''');
+ }, skip: 'Fails for single digit float');
- // test('[Example 10.8]', () {
- // expectYamlStreamLoads({
- // "A null": null,
- // "Booleans": [true, false],
- // "Integers": [0, -0, 3, -19],
- // "Floats": [0, 0, 12000, -200000],
- // // Despite being invalid in the JSON schema, these values are valid in
- // // the core schema which this implementation supports.
- // "Invalid": [ true, null, 7, 0x3A, 12.3]
- // },
- // """
- // A null: null
- // Booleans: [ true, false ]
- // Integers: [ 0, -0, 3, -19 ]
- // Floats: [ 0., -0.0, 12e03, -2E+05 ]
- // Invalid: [ True, Null, 0o7, 0x3A, +12.3 ]""");
- // });
+ test('[Example 10.8]', () {
+ expectYamlStreamLoads([
+ {
+ 'A null': null,
+ 'Booleans': [true, false],
+ 'Integers': [0, -0, 3, -19],
+ 'Floats': [0, 0, 12000, -200000],
+ // Despite being invalid in the JSON schema, these values are valid in
+ // the core schema which this implementation supports.
+ 'Invalid': [true, null, 7, 0x3A, 12.3]
+ }
+ ], '''
+ A null: null
+ Booleans: [ true, false ]
+ Integers: [ 0, -0, 3, -19 ]
+ Floats: [ 0., -0.0, 12e03, -2E+05 ]
+ Invalid: [ True, Null, 0o7, 0x3A, +12.3 ]''');
+ });
});
group('10.3: Core Schema', () {