summaryrefslogtreecommitdiff
path: root/serde_dhall/tests
diff options
context:
space:
mode:
authorNadrieril Feneanar2019-08-13 16:47:10 +0200
committerGitHub2019-08-13 16:47:10 +0200
commitfc6c42f9a80902f7183c297cd8f9dcdbe5376ec5 (patch)
tree48d04a37f15612fba2efb88c15149ed39731d96e /serde_dhall/tests
parent7d17d39005531cb77d8eaf32ed7de8938c66f874 (diff)
parentbf5d33f3ba991afe398d58fb4fed38ec72d6f4c7 (diff)
Merge pull request #100 from Nadrieril/api
Rework API
Diffstat (limited to '')
-rw-r--r--serde_dhall/tests/traits.rs (renamed from dhall/tests/traits.rs)10
1 files changed, 5 insertions, 5 deletions
diff --git a/dhall/tests/traits.rs b/serde_dhall/tests/traits.rs
index 0f75553..55be63b 100644
--- a/dhall/tests/traits.rs
+++ b/serde_dhall/tests/traits.rs
@@ -1,10 +1,10 @@
#![feature(proc_macro_hygiene)]
-use dhall::de::{from_str, StaticType, Type};
+use serde_dhall::{from_str, StaticType, Value};
#[test]
fn test_static_type() {
- fn parse(s: &str) -> Type {
- from_str(s, None).unwrap()
+ fn parse(s: &str) -> Value {
+ from_str(s).unwrap()
}
assert_eq!(bool::static_type(), parse("Bool"));
@@ -15,14 +15,14 @@ fn test_static_type() {
parse("{ _1: Bool, _2: List Text }")
);
- #[derive(dhall::de::StaticType)]
+ #[derive(serde_dhall::StaticType)]
#[allow(dead_code)]
struct A {
field1: bool,
field2: Option<bool>,
}
assert_eq!(
- <A as dhall::de::StaticType>::static_type(),
+ <A as serde_dhall::StaticType>::static_type(),
parse("{ field1: Bool, field2: Optional Bool }")
);