summaryrefslogtreecommitdiff
path: root/dhall/src/tests.rs
diff options
context:
space:
mode:
authorNadrieril2020-03-13 17:04:47 +0000
committerNadrieril2020-03-31 21:44:01 +0100
commit35db1b4b54dba8b0cafe661329e0099dfabd8073 (patch)
tree8b98ed443c5acb88841ccda355e7f24cb9c56515 /dhall/src/tests.rs
parent2f5c45fd2f712f7befe6f7c92b62dc76d5f77538 (diff)
Remove top-level Expr aliases
Diffstat (limited to 'dhall/src/tests.rs')
-rw-r--r--dhall/src/tests.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/dhall/src/tests.rs b/dhall/src/tests.rs
index 659f6f7..2cd354f 100644
--- a/dhall/src/tests.rs
+++ b/dhall/src/tests.rs
@@ -10,8 +10,8 @@ use std::io::{Read, Write};
use std::path::PathBuf;
use crate::error::{ErrorKind, Result};
-use crate::syntax::binary;
-use crate::{Normalized, NormalizedExpr, Parsed, Resolved, Typed};
+use crate::syntax::{binary, Expr};
+use crate::{Normalized, Parsed, Resolved, Typed};
macro_rules! assert_eq_display {
($left:expr, $right:expr) => {{
@@ -111,7 +111,7 @@ impl TestFile {
env::var("UPDATE_TEST_FILES") == Ok("1".to_string())
}
/// Write the provided expression to the pointed file.
- fn write_expr(&self, expr: impl Into<NormalizedExpr>) -> Result<()> {
+ fn write_expr(&self, expr: impl Into<Expr>) -> Result<()> {
let expr = expr.into();
let path = self.path();
create_dir_all(path.parent().unwrap())?;
@@ -142,7 +142,7 @@ impl TestFile {
}
/// Check that the provided expression matches the file contents.
- pub fn compare(&self, expr: impl Into<NormalizedExpr>) -> Result<()> {
+ pub fn compare(&self, expr: impl Into<Expr>) -> Result<()> {
let expr = expr.into();
if !self.path().is_file() {
return self.write_expr(expr);
@@ -159,7 +159,7 @@ impl TestFile {
Ok(())
}
/// Check that the provided expression matches the file contents.
- pub fn compare_debug(&self, expr: impl Into<NormalizedExpr>) -> Result<()> {
+ pub fn compare_debug(&self, expr: impl Into<Expr>) -> Result<()> {
let expr = expr.into();
if !self.path().is_file() {
return self.write_expr(expr);
@@ -176,10 +176,7 @@ impl TestFile {
Ok(())
}
/// Check that the provided expression matches the file contents.
- pub fn compare_binary(
- &self,
- expr: impl Into<NormalizedExpr>,
- ) -> Result<()> {
+ pub fn compare_binary(&self, expr: impl Into<Expr>) -> Result<()> {
let expr = expr.into();
match self {
TestFile::Binary(_) => {}