|
@@ -392,6 +392,7 @@ test_unmarshal_map_into_struct_partially :: proc(t: ^testing.T) {
|
|
bar: struct {
|
|
bar: struct {
|
|
hello: string,
|
|
hello: string,
|
|
world: string,
|
|
world: string,
|
|
|
|
+ foo: string `cbor:"-"`,
|
|
},
|
|
},
|
|
baz: int,
|
|
baz: int,
|
|
}
|
|
}
|
|
@@ -401,6 +402,7 @@ test_unmarshal_map_into_struct_partially :: proc(t: ^testing.T) {
|
|
hello: string,
|
|
hello: string,
|
|
world: string,
|
|
world: string,
|
|
hellope: string,
|
|
hellope: string,
|
|
|
|
+ foo: string,
|
|
},
|
|
},
|
|
baz: int,
|
|
baz: int,
|
|
}
|
|
}
|
|
@@ -409,6 +411,7 @@ test_unmarshal_map_into_struct_partially :: proc(t: ^testing.T) {
|
|
hello = "hello",
|
|
hello = "hello",
|
|
world = "world",
|
|
world = "world",
|
|
hellope = "hellope",
|
|
hellope = "hellope",
|
|
|
|
+ foo = "foo",
|
|
},
|
|
},
|
|
baz = 4,
|
|
baz = 4,
|
|
}
|
|
}
|
|
@@ -426,7 +429,7 @@ test_unmarshal_map_into_struct_partially :: proc(t: ^testing.T) {
|
|
less_out: Foo
|
|
less_out: Foo
|
|
uerr := cbor.unmarshal(string(more_bin), &less_out)
|
|
uerr := cbor.unmarshal(string(more_bin), &less_out)
|
|
testing.expect_value(t, uerr, nil)
|
|
testing.expect_value(t, uerr, nil)
|
|
- testing.expect_value(t, less, less_out)
|
|
|
|
|
|
+ testing.expect_value(t, less_out, less)
|
|
|
|
|
|
delete(more_bin)
|
|
delete(more_bin)
|
|
delete(less_out.bar.hello)
|
|
delete(less_out.bar.hello)
|