summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstuebinm2021-04-26 11:44:44 +0200
committerstuebinm2021-04-26 11:44:44 +0200
commit033391a6b4a9f6150a0054db0869246c1f46357b (patch)
tree55413151f95f1406242e727a64f222b1d72ad1ad
parent449d72e98e427b3f81dc72e800098fce8895353b (diff)
derive macro: add test for record in sum typederive-macro
-rw-r--r--serde_dhall/tests/traits.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/serde_dhall/tests/traits.rs b/serde_dhall/tests/traits.rs
index ed768c1..cd29f9e 100644
--- a/serde_dhall/tests/traits.rs
+++ b/serde_dhall/tests/traits.rs
@@ -64,4 +64,14 @@ fn test_static_type() {
B(bool),
}
assert_eq!(F::static_type(), parse("< A | B: Bool >"));
+
+
+ #[derive(StaticType)]
+ #[allow(dead_code)]
+ enum G {
+ A,
+ B(bool),
+ C {a: bool, b: u64}
+ }
+ assert_eq!(G::static_type(), parse("< A | B: Bool | C: { a: Bool, b: Natural } >"))
}