From 9c8ba84fa5d0b392f19e9e9b8569ee2fbe96bd28 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 18 Apr 2019 16:09:13 +0200 Subject: Remove obsolete dhall_expr!() macro --- dhall/tests/traits.rs | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'dhall/tests') diff --git a/dhall/tests/traits.rs b/dhall/tests/traits.rs index 00e6509..a7cd530 100644 --- a/dhall/tests/traits.rs +++ b/dhall/tests/traits.rs @@ -1,7 +1,7 @@ #![feature(proc_macro_hygiene)] use dhall::de::SimpleStaticType; use dhall_core::{SubExpr, X}; -use dhall_generator::dhall_expr; +use dhall_generator; #[test] fn test_static_type() { @@ -9,15 +9,21 @@ fn test_static_type() { x.into() } - assert_eq!(bool::get_simple_static_type(), mktype(dhall_expr!(Bool))); - assert_eq!(String::get_simple_static_type(), mktype(dhall_expr!(Text))); + assert_eq!( + bool::get_simple_static_type(), + mktype(dhall_generator::subexpr!(Bool)) + ); + assert_eq!( + String::get_simple_static_type(), + mktype(dhall_generator::subexpr!(Text)) + ); assert_eq!( >::get_simple_static_type(), - mktype(dhall_expr!(Optional Bool)) + mktype(dhall_generator::subexpr!(Optional Bool)) ); assert_eq!( <(bool, Option)>::get_simple_static_type(), - mktype(dhall_expr!({ _1: Bool, _2: Optional Text })) + mktype(dhall_generator::subexpr!({ _1: Bool, _2: Optional Text })) ); #[derive(dhall::de::SimpleStaticType)] @@ -28,7 +34,9 @@ fn test_static_type() { } assert_eq!( ::get_simple_static_type(), - mktype(dhall_expr!({ field1: Bool, field2: Optional Bool })) + mktype( + dhall_generator::subexpr!({ field1: Bool, field2: Optional Bool }) + ) ); #[derive(SimpleStaticType)] @@ -55,7 +63,7 @@ fn test_static_type() { struct D(); assert_eq!( >::get_simple_static_type(), - mktype(dhall_expr!({ _1: {}, _2: Optional Text })) + mktype(dhall_generator::subexpr!({ _1: {}, _2: Optional Text })) ); #[derive(SimpleStaticType)] @@ -66,6 +74,6 @@ fn test_static_type() { }; assert_eq!( >::get_simple_static_type(), - mktype(dhall_expr!(< A: Bool | B: Text >)) + mktype(dhall_generator::subexpr!(< A: Bool | B: Text >)) ); } -- cgit v1.2.3