summaryrefslogtreecommitdiff
path: root/dhall/build.rs
diff options
context:
space:
mode:
authorNadrieril2020-04-05 21:34:10 +0100
committerNadrieril2020-04-05 21:34:10 +0100
commit251b378fd8d93ea625a739cde06675e2bbc32c2c (patch)
treedbcb8175ed3477396064590db878b890973a8d10 /dhall/build.rs
parent4290615769fc26c5e4b70843e7fbfddf6359af41 (diff)
Add semantic-hash tests
Diffstat (limited to '')
-rw-r--r--dhall/build.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/dhall/build.rs b/dhall/build.rs
index 19abcc4..c79682d 100644
--- a/dhall/build.rs
+++ b/dhall/build.rs
@@ -14,6 +14,8 @@ enum FileType {
Text,
/// Dhall binary file
Binary,
+ /// Text file with hash
+ Hash,
/// Text file with expected text output
UI,
}
@@ -23,6 +25,7 @@ impl FileType {
match self {
FileType::Text => "dhall",
FileType::Binary => "dhallb",
+ FileType::Hash => "hash",
FileType::UI => "txt",
}
}
@@ -30,6 +33,7 @@ impl FileType {
match self {
FileType::Text => "TestFile::Source",
FileType::Binary => "TestFile::Binary",
+ FileType::Hash => "TestFile::Binary",
FileType::UI => "TestFile::UI",
}
}
@@ -280,6 +284,22 @@ fn generate_tests() -> std::io::Result<()> {
..default_feature.clone()
},
TestFeature {
+ module_name: "semantic_hash",
+ directory: "semantic-hash/success/",
+ variant: "SemanticHash",
+ exclude_path: Rc::new(|path: &str| {
+ false
+ // We don't support bignums
+ || path == "simple/integerToDouble"
+ // See https://github.com/pyfisch/cbor/issues/109
+ || path == "prelude/Integer/toDouble/0"
+ || path == "prelude/Integer/toDouble/1"
+ || path == "prelude/Natural/toDouble/0"
+ }),
+ output_type: Some(FileType::Hash),
+ ..default_feature.clone()
+ },
+ TestFeature {
module_name: "beta_normalize",
directory: "normalization/success/",
variant: "Normalization",