From 0424d165836fcbf15aa2e05527d0e790941c9518 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 24 Mar 2019 23:36:15 +0100 Subject: Lay groundwork for DhallType deriving --- dhall/src/lib.rs | 1 - dhall/tests/dhall_type.rs | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 dhall/tests/dhall_type.rs (limited to 'dhall') diff --git a/dhall/src/lib.rs b/dhall/src/lib.rs index 3e76395..d9f9edb 100644 --- a/dhall/src/lib.rs +++ b/dhall/src/lib.rs @@ -10,7 +10,6 @@ mod normalize; pub use crate::normalize::*; pub mod binary; -// pub mod dhall_type; pub mod imports; pub mod typecheck; diff --git a/dhall/tests/dhall_type.rs b/dhall/tests/dhall_type.rs new file mode 100644 index 0000000..cbb71a4 --- /dev/null +++ b/dhall/tests/dhall_type.rs @@ -0,0 +1,15 @@ +#![feature(proc_macro_hygiene)] +use dhall_core::*; +use dhall_generator::*; + +#[derive(DhallType)] +struct A { + _field1: bool, + // field2: Option, +} + +#[test] +fn test_dhall_type_a() { + assert_eq!(A::dhall_type(), dhall_expr!(False)); + // assert_eq!(A::dhall_type(), dhall_expr!({ field1: Bool })); +} -- cgit v1.2.3