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

Commit

Permalink
Merge pull request #218 from rukai/add_unit_struct_test
Browse files Browse the repository at this point in the history
Add test for unit_struct
  • Loading branch information
dtolnay committed Dec 13, 2021
2 parents 1db8fdb + b4996cc commit 75a43c4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,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

0 comments on commit 75a43c4

Please sign in to comment.