summaryrefslogtreecommitdiff
path: root/serde_dhall/tests
diff options
context:
space:
mode:
authorNadrieril2020-05-10 19:32:34 +0100
committerNadrieril2020-10-28 20:18:17 +0000
commit9e3f68fc54babf24133cf66ae6be7d069ba2c271 (patch)
treeac3f0782fb90c8f6b03b3d29d1032d06d637e4ee /serde_dhall/tests
parent2b4ba42b7f0a44893f17548f069cec1e60819aa4 (diff)
Prefer u64/i64 to usize/isize
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
);