diff options
author | Nadrieril | 2020-03-22 21:20:58 +0000 |
---|---|---|
committer | Nadrieril | 2020-03-31 21:45:31 +0100 |
commit | 1a98b506055779e1a60558d9c5a56b071b3d61a0 (patch) | |
tree | 1ec11648ed9e3c503c6f4f06307c3541af648a23 /serde_dhall/tests | |
parent | 196491a37a9ab2869ab6d76e1417a85a9e033dd4 (diff) |
Reorganize API and internals of serde_dhall a bit
Diffstat (limited to 'serde_dhall/tests')
-rw-r--r-- | serde_dhall/tests/de.rs | 6 | ||||
-rw-r--r-- | serde_dhall/tests/version_numbers.rs | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/serde_dhall/tests/de.rs b/serde_dhall/tests/de.rs index b201e4f..f28b265 100644 --- a/serde_dhall/tests/de.rs +++ b/serde_dhall/tests/de.rs @@ -1,10 +1,10 @@ use serde::Deserialize; -use serde_dhall::{from_str, from_str_auto_type, StaticType}; +use serde_dhall::{from_str, from_str_static_type, StaticType}; #[test] fn test_de_typed() { fn parse<T: serde_dhall::Deserialize + StaticType>(s: &str) -> T { - from_str_auto_type(s).unwrap() + from_str_static_type(s).unwrap() } assert_eq!(parse::<bool>("True"), true); @@ -52,7 +52,7 @@ fn test_de_typed() { } assert_eq!(parse::<Baz>("< X | Y: Integer >.X"), Baz::X); - assert!(from_str_auto_type::<Baz>("< X | Y: Integer >.Y").is_err()); + assert!(from_str_static_type::<Baz>("< X | Y: Integer >.Y").is_err()); } #[test] diff --git a/serde_dhall/tests/version_numbers.rs b/serde_dhall/tests/version_numbers.rs index 97254a9..8307e47 100644 --- a/serde_dhall/tests/version_numbers.rs +++ b/serde_dhall/tests/version_numbers.rs @@ -10,5 +10,8 @@ fn test_html_root_url() { #[test] fn test_readme_mentions_version() { - version_sync::assert_contains_regex!("../README.md", "^#### \\[{version}\\]"); + version_sync::assert_contains_regex!( + "../README.md", + "^#### \\[{version}\\]" + ); } |