summaryrefslogtreecommitdiff
path: root/dhall/tests/dhall_type.rs
diff options
context:
space:
mode:
authorNadrieril2019-03-31 13:24:27 +0200
committerNadrieril2019-03-31 18:05:32 +0200
commitbc64e9e305f50ad04e6e2071dad8c153c1582b8c (patch)
tree80dd3056ffa7280dcb0493695ccd90aaa35fa5da /dhall/tests/dhall_type.rs
parent5d6f095fbd9b803870777b77c42e4a9df236dd67 (diff)
Remove some redundant namespacing
Diffstat (limited to '')
-rw-r--r--dhall/tests/dhall_type.rs32
1 files changed, 16 insertions, 16 deletions
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<String>)>::dhall_type(),
+ <(bool, Option<String>)>::get_type(),
dhall_expr!({ _1: Bool, _2: Optional Text })
);
- #[derive(DhallType)]
+ #[derive(dhall::Type)]
#[allow(dead_code)]
struct A {
field1: bool,
field2: Option<bool>,
}
assert_eq!(
- A::dhall_type(),
+ <A as 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<T>,
}
- assert_eq!(<B<'static, bool>>::dhall_type(), A::dhall_type());
+ assert_eq!(<B<'static, bool>>::get_type(), A::get_type());
- #[derive(DhallType)]
+ #[derive(Type)]
#[allow(dead_code)]
struct C<T>(T, Option<String>);
assert_eq!(
- <C<bool>>::dhall_type(),
- <(bool, Option<String>)>::dhall_type()
+ <C<bool>>::get_type(),
+ <(bool, Option<String>)>::get_type()
);
- #[derive(DhallType)]
+ #[derive(Type)]
#[allow(dead_code)]
struct D();
assert_eq!(
- <C<D>>::dhall_type(),
+ <C<D>>::get_type(),
dhall_expr!({ _1: {}, _2: Optional Text })
);
- #[derive(DhallType)]
+ #[derive(Type)]
#[allow(dead_code)]
enum E<T> {
A(T),
B(String),
};
- assert_eq!(<E<bool>>::dhall_type(), dhall_expr!(< A: Bool | B: Text >));
+ assert_eq!(<E<bool>>::get_type(), dhall_expr!(< A: Bool | B: Text >));
}