Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Add test for unit_struct #218

Merged
merged 1 commit into from
Dec 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 12 additions & 1 deletion tests/test_serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ fn test_float32() {
"})
.unwrap();
assert!(single_float.is_nan());

}

#[test]
Expand Down Expand Up @@ -273,6 +272,18 @@ fn test_unit() {
test_serde(&thing, yaml);
}

#[test]
fn test_unit_struct() {
#[derive(Serialize, Deserialize, PartialEq, Debug)]
struct Foo;
let thing = Foo;
let yaml = indoc! {"
---
~
"};
test_serde(&thing, yaml);
}

#[test]
fn test_unit_variant() {
#[derive(Serialize, Deserialize, PartialEq, Debug)]
Expand Down