From a01cf8ad53a3839d13aa99a589ba0f2aa796d511 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Wed, 7 Aug 2019 21:57:51 +0200 Subject: Remove an annoying redundancy in the test harness --- dhall/src/phase/resolve.rs | 4 ++-- dhall/src/tests.rs | 14 +------------- 2 files changed, 3 insertions(+), 15 deletions(-) (limited to 'dhall/src') diff --git a/dhall/src/phase/resolve.rs b/dhall/src/phase/resolve.rs index 0609694..0b29513 100644 --- a/dhall/src/phase/resolve.rs +++ b/dhall/src/phase/resolve.rs @@ -110,13 +110,13 @@ mod spec_tests { macro_rules! import_success { ($name:ident, $path:expr) => { - make_spec_test!(Import, Success, $name, &("success/".to_owned() + $path)); + make_spec_test!(Import, Success, $name, &("../dhall-lang/tests/import/success/".to_owned() + $path)); }; } // macro_rules! import_failure { // ($name:ident, $path:expr) => { - // make_spec_test!(Import, Failure, $name, &("failure/".to_owned() + $path)); + // make_spec_test!(Import, Failure, $name, &("../dhall-lang/tests/import/failure/".to_owned() + $path)); // }; // } diff --git a/dhall/src/tests.rs b/dhall/src/tests.rs index da48d15..9784eec 100644 --- a/dhall/src/tests.rs +++ b/dhall/src/tests.rs @@ -81,19 +81,7 @@ pub fn run_test( ) -> Result<()> { use self::Feature::*; use self::Status::*; - let feature_prefix = match feature { - Parser => "parser/", - Printer => "parser/", - BinaryEncoding => "parser/", - BinaryDecoding => "binary-decode/", - Import => "import/", - Normalization => "normalization/", - AlphaNormalization => "alpha-normalization/", - Typecheck => "typecheck/", - TypeInference => "type-inference/", - }; - let base_path = - "../dhall-lang/tests/".to_owned() + feature_prefix + base_path; + let base_path = base_path.to_owned(); match status { Success => { match feature { -- cgit v1.2.3