Skip to content

Commit

Permalink
accept some insta test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Aug 20, 2024
1 parent a3a9cac commit e97b5f9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions crates/lib/tests/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,27 @@ fn test_json_mappings() {
("and_peggy", AlgebraicType::option(AlgebraicType::F64)),
("identity", Identity::get_type()),
]);

let data = r#"
{
"foo": 42,
"bar": "404040FFFF0A48656C6C6F",
"baz": ["heyyyyyy", "hooo"],
"quux": { "Hash": "54a3e6d2b0959deaacf102292b1cbd6fcbb8cf237f73306e27ed82c3153878aa" },
"and_peggy": { "some": 3.141592653589793238426 },
"identity": ["0000000000000000000000000000000000000000000000000000000000000000"]
"identity": ["0x0"]
}
"#; // all of those ^^^^^^ digits are from memory
de_json_snapshot!(schema, data);

let data = r#"
{
"foo": 5654,
"bar": [1, 15, 44],
"baz": ["it's 🥶°C"],
"quux": { "Unit": [] },
"and_peggy": null,
"identity": ["0000000000000000000000000000000000000000000000000000000000000000"]
"identity": ["0x0"]
}
"#;
de_json_snapshot!(schema, data);
Expand Down
4 changes: 2 additions & 2 deletions crates/lib/tests/snapshots/serde__json_mappings-2.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/lib/tests/serde.rs
expression: "de_json({\n \"foo\": 5654,\n \"bar\": [1, 15, 44],\n \"baz\": [\"it's 🥶°C\"],\n \"quux\": { \"Unit\": [] },\n \"and_peggy\": null,\n \"identity\": [\"0000000000000000000000000000000000000000000000000000000000000000\"]\n})"
expression: "de_json({\n \"foo\": 5654,\n \"bar\": [1, 15, 44],\n \"baz\": [\"it's 🥶°C\"],\n \"quux\": { \"Unit\": [] },\n \"and_peggy\": null,\n \"identity\": [\"0x0\"]\n})"
---
(
foo = 5654,
Expand All @@ -15,6 +15,6 @@ expression: "de_json({\n \"foo\": 5654,\n \"bar\": [1, 15, 44],\n \"baz
none = (),
),
identity = (
__identity_bytes = 0x0000000000000000000000000000000000000000000000000000000000000000,
__identity__ = 0x0000000000000000000000000000000000000000000000000000000000000000,
),
)
4 changes: 2 additions & 2 deletions crates/lib/tests/snapshots/serde__json_mappings.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/lib/tests/serde.rs
expression: "de_json({\n \"foo\": 42,\n \"bar\": \"404040FFFF0A48656C6C6F\",\n \"baz\": [\"heyyyyyy\", \"hooo\"],\n \"quux\": { \"Hash\": \"54a3e6d2b0959deaacf102292b1cbd6fcbb8cf237f73306e27ed82c3153878aa\" },\n \"and_peggy\": { \"some\": 3.141592653589793238426 },\n \"identity\": [\"0000000000000000000000000000000000000000000000000000000000000000\"]\n})"
expression: "de_json({\n \"foo\": 42,\n \"bar\": \"404040FFFF0A48656C6C6F\",\n \"baz\": [\"heyyyyyy\", \"hooo\"],\n \"quux\": { \"Hash\": \"54a3e6d2b0959deaacf102292b1cbd6fcbb8cf237f73306e27ed82c3153878aa\" },\n \"and_peggy\": { \"some\": 3.141592653589793238426 },\n \"identity\": [\"0x0\"]\n})"
---
(
foo = 42,
Expand All @@ -16,6 +16,6 @@ expression: "de_json({\n \"foo\": 42,\n \"bar\": \"404040FFFF0A48656C6C6F\
some = 3.141592653589793,
),
identity = (
__identity_bytes = 0x0000000000000000000000000000000000000000000000000000000000000000,
__identity__ = 0x0000000000000000000000000000000000000000000000000000000000000000,
),
)

0 comments on commit e97b5f9

Please sign in to comment.