diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2022-09-04 15:57:25 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2022-09-04 15:58:00 -0300 |
commit | acd275df58ce30ae6d041a766d601a69ea6360a7 (patch) | |
tree | cf780e66043cf08b9f2d20e601f6def77b4d6a4c /tests | |
parent | 91c1fe71412bccdcae14261494b2b0fbcc8269d0 (diff) |
Implement most functionality
Missing structs
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unit.rs b/tests/unit.rs new file mode 100644 index 0000000..c18ee31 --- /dev/null +++ b/tests/unit.rs @@ -0,0 +1,13 @@ +#[derive(serde::Serialize)] +struct Foo(String); + +#[derive(serde::Deserialize)] +struct Bar(String); + +#[test] +fn transmute() { + let settings = Default::default(); + let foo = Foo(String::from("Hello!")); + let bar: Bar = serde_transmute::transmute(&foo, &settings).unwrap(); + assert_eq!(foo.0, bar.0); +} |