From b4ebbb2b8851e1f792ea6c01b927b83eddee7c5a Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 7 Dec 2020 19:58:24 +0000 Subject: tests: add a test that fetches the remote prelude It's too slow even in release mode. --- serde_dhall/tests/serde.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'serde_dhall') diff --git a/serde_dhall/tests/serde.rs b/serde_dhall/tests/serde.rs index fe0bffb..78382d0 100644 --- a/serde_dhall/tests/serde.rs +++ b/serde_dhall/tests/serde.rs @@ -1,6 +1,8 @@ mod serde { use serde::{Deserialize, Serialize}; - use serde_dhall::{from_str, serialize, FromDhall, StaticType, ToDhall}; + use serde_dhall::{ + from_str, serialize, FromDhall, StaticType, ToDhall, Value, + }; fn assert_de(s: &str, x: T) where @@ -245,6 +247,20 @@ mod serde { ); } + #[test] + #[ignore] // Way too slow + fn test_prelude() { + assert_eq!( + serde_dhall::from_str( + "https://prelude.dhall-lang.org/package.dhall" + ) + .parse::() + .map(|_| ()) + .map_err(|e| e.to_string()), + Ok(()) + ); + } + // TODO: test various builder configurations // In particular test cloning and reusing builder } -- cgit v1.2.3