From bc64e9e305f50ad04e6e2071dad8c153c1582b8c Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 31 Mar 2019 13:24:27 +0200 Subject: Remove some redundant namespacing --- dhall/tests/dhall_type.rs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'dhall/tests/dhall_type.rs') diff --git a/dhall/tests/dhall_type.rs b/dhall/tests/dhall_type.rs index 633d7c6..faece20 100644 --- a/dhall/tests/dhall_type.rs +++ b/dhall/tests/dhall_type.rs @@ -1,56 +1,56 @@ #![feature(proc_macro_hygiene)] -use dhall::*; -use dhall_generator::*; +use dhall::Type; +use dhall_generator::dhall_expr; #[test] fn test_dhall_type() { - assert_eq!(bool::dhall_type(), dhall_expr!(Bool)); - assert_eq!(String::dhall_type(), dhall_expr!(Text)); + assert_eq!(bool::get_type(), dhall_expr!(Bool)); + assert_eq!(String::get_type(), dhall_expr!(Text)); assert_eq!( - <(bool, Option)>::dhall_type(), + <(bool, Option)>::get_type(), dhall_expr!({ _1: Bool, _2: Optional Text }) ); - #[derive(DhallType)] + #[derive(dhall::Type)] #[allow(dead_code)] struct A { field1: bool, field2: Option, } assert_eq!( - A::dhall_type(), + ::get_type(), dhall_expr!({ field1: Bool, field2: Optional Bool }) ); - #[derive(DhallType)] + #[derive(Type)] #[allow(dead_code)] struct B<'a, T: 'a> { field1: &'a T, field2: Option, } - assert_eq!(>::dhall_type(), A::dhall_type()); + assert_eq!(>::get_type(), A::get_type()); - #[derive(DhallType)] + #[derive(Type)] #[allow(dead_code)] struct C(T, Option); assert_eq!( - >::dhall_type(), - <(bool, Option)>::dhall_type() + >::get_type(), + <(bool, Option)>::get_type() ); - #[derive(DhallType)] + #[derive(Type)] #[allow(dead_code)] struct D(); assert_eq!( - >::dhall_type(), + >::get_type(), dhall_expr!({ _1: {}, _2: Optional Text }) ); - #[derive(DhallType)] + #[derive(Type)] #[allow(dead_code)] enum E { A(T), B(String), }; - assert_eq!(>::dhall_type(), dhall_expr!(< A: Bool | B: Text >)); + assert_eq!(>::get_type(), dhall_expr!(< A: Bool | B: Text >)); } -- cgit v1.2.3