From 033391a6b4a9f6150a0054db0869246c1f46357b Mon Sep 17 00:00:00 2001 From: stuebinm Date: Mon, 26 Apr 2021 11:44:44 +0200 Subject: derive macro: add test for record in sum type --- serde_dhall/tests/traits.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 } >")) } -- cgit v1.2.3