Skip to content

Commit

Permalink
chore: update test cases due to upgrade serde_yaml deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Peefy committed Jul 25, 2023
1 parent 2ec6aed commit d2dd76b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions kclvm/runtime/src/manifests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn test_kclvm_manifests_yaml_stream() {
YamlEncodeOptions::default(),
),
(
"a:\n - 1\n - 2\n - 3\nb: s\n",
"a:\n- 1\n- 2\n- 3\nb: s\n",
ValueRef::list(Some(&[&ValueRef::dict(Some(&[
("a", &ValueRef::list_int(&[1, 2, 3])),
("b", &ValueRef::str("s")),
Expand All @@ -36,7 +36,7 @@ fn test_kclvm_manifests_yaml_stream() {
},
),
(
"a: 1\nb: ~\n",
"a: 1\nb: null\n",
ValueRef::list(Some(&[&ValueRef::dict(Some(&[
("a", &ValueRef::int(1)),
("b", &ValueRef::none()),
Expand Down
4 changes: 2 additions & 2 deletions kclvm/runtime/src/manifests/yaml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ mod test_manifests_yaml {
YamlEncodeOptions::default(),
),
(
"a:\n - 1\n - 2\n - 3\nb: s\n",
"a:\n- 1\n- 2\n- 3\nb: s\n",
ValueRef::list(Some(&[&ValueRef::dict(Some(&[
("a", &ValueRef::list_int(&[1, 2, 3])),
("b", &ValueRef::str("s")),
Expand All @@ -58,7 +58,7 @@ mod test_manifests_yaml {
},
),
(
"a: 1\nb: ~\n",
"a: 1\nb: null\n",
ValueRef::list(Some(&[&ValueRef::dict(Some(&[
("a", &ValueRef::int(1)),
("b", &ValueRef::none()),
Expand Down
8 changes: 4 additions & 4 deletions kclvm/runtime/src/value/val_yaml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ mod test_value_yaml {
),
(
"a:\n- 1\n -2\n-3",
"while parsing a block mapping, did not find expected key at line 4 column 1",
"could not find expected ':' at line 5 column 1, while scanning a simple key at line 4 column 1",
),
];
for (yaml_str, expected) in cases {
Expand Down Expand Up @@ -192,7 +192,7 @@ mod test_value_yaml {
),
(
"b:3\n---\na:\n- 1\n -2\n-3",
"while parsing a block mapping, did not find expected key at line 6 column 1",
"could not find expected ':' at line 7 column 1, while scanning a simple key at line 6 column 1",
),
];
for (yaml_str, expected) in cases {
Expand All @@ -214,7 +214,7 @@ mod test_value_yaml {
("a", &ValueRef::list_int(&[1, 2, 3])),
("b", &ValueRef::str("s")),
])),
"a:\n - 1\n - 2\n - 3\nb: s\n",
"a:\n- 1\n- 2\n- 3\nb: s\n",
),
];
for (value, expected) in cases {
Expand Down Expand Up @@ -271,7 +271,7 @@ mod test_value_yaml {
("b", &ValueRef::list_int(&[1, 2, 3])),
("a", &ValueRef::str("s")),
])),
"a: s\nb:\n - 1\n - 2\n - 3\n",
"a: s\nb:\n- 1\n- 2\n- 3\n",
YamlEncodeOptions {
sort_keys: true,
ignore_private: false,
Expand Down

0 comments on commit d2dd76b

Please sign in to comment.