summaryrefslogtreecommitdiff
path: root/serde_dhall/tests
diff options
context:
space:
mode:
authorNadrieril2020-10-28 20:38:29 +0000
committerGitHub2020-10-28 20:38:29 +0000
commit70727acbda68e104f60ae1dbbe95adbcec08a628 (patch)
treeac3f0782fb90c8f6b03b3d29d1032d06d637e4ee /serde_dhall/tests
parent2b4ba42b7f0a44893f17548f069cec1e60819aa4 (diff)
parent9e3f68fc54babf24133cf66ae6be7d069ba2c271 (diff)
Merge pull request #188 from Nadrieril/change-nums
Use u64/i64 instead of usize/isize for the main number types
Diffstat (limited to 'serde_dhall/tests')
-rw-r--r--serde_dhall/tests/de.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/serde_dhall/tests/de.rs b/serde_dhall/tests/de.rs
index 549a753..3abaad2 100644
--- a/serde_dhall/tests/de.rs
+++ b/serde_dhall/tests/de.rs
@@ -69,7 +69,7 @@ fn test_de_untyped() {
// Test tuples on record of wrong type
assert_eq!(
- parse::<(u64, String, isize)>(r#"{ y = "foo", x = 1, z = +42 }"#),
+ parse::<(u64, String, i64)>(r#"{ y = "foo", x = 1, z = +42 }"#),
(1, "foo".to_owned(), 42)
);
@@ -77,11 +77,11 @@ fn test_de_untyped() {
expected_map.insert("x".to_string(), 1);
expected_map.insert("y".to_string(), 2);
assert_eq!(
- parse::<HashMap<String, usize>>("{ x = 1, y = 2 }"),
+ parse::<HashMap<String, u64>>("{ x = 1, y = 2 }"),
expected_map
);
assert_eq!(
- parse::<HashMap<String, usize>>("toMap { x = 1, y = 2 }"),
+ parse::<HashMap<String, u64>>("toMap { x = 1, y = 2 }"),
expected_map
);
@@ -90,9 +90,7 @@ fn test_de_untyped() {
expected_map.insert("FOO_BAR".to_string(), 2);
expected_map.insert("baz-kux".to_string(), 3);
assert_eq!(
- parse::<HashMap<String, usize>>(
- "{ `if` = 1, FOO_BAR = 2, baz-kux = 3 }"
- ),
+ parse::<HashMap<String, u64>>("{ `if` = 1, FOO_BAR = 2, baz-kux = 3 }"),
expected_map
);
@@ -100,7 +98,7 @@ fn test_de_untyped() {
expected_map.insert("x".to_string(), 1);
expected_map.insert("y".to_string(), 2);
assert_eq!(
- parse::<BTreeMap<String, usize>>("{ x = 1, y = 2 }"),
+ parse::<BTreeMap<String, u64>>("{ x = 1, y = 2 }"),
expected_map
);