diff --git a/build.rs b/build.rs index 2e36dac..f9b259a 100644 --- a/build.rs +++ b/build.rs @@ -7,11 +7,11 @@ fn main() { .write_all( b"// This file is generated by build.rs -use std::path::Path; -use std::fs::File; -use std::io::Read; use super::common::TestCase; use super::get_library; +use std::fs::File; +use std::io::Read; +use std::path::Path; fn integration_tests(input: &Path) { let mut str: String = \"\".to_string(); @@ -21,7 +21,6 @@ fn integration_tests(input: &Path) { println!(\"\tRunning integration test {}\", test_case.name); test_case.run_test(get_library()); } - ", ) .unwrap(); @@ -41,8 +40,7 @@ fn integration_tests(input: &Path) { fn {}() {{ integration_tests(Path::new(\"{}\")); }} - - ", +", file_name, path.to_str().unwrap(), ) diff --git a/tests/datatests/mod.rs b/tests/datatests/mod.rs index 6787e9f..d8188f0 100644 --- a/tests/datatests/mod.rs +++ b/tests/datatests/mod.rs @@ -1,10 +1,10 @@ // This file is generated by build.rs -use std::path::Path; -use std::fs::File; -use std::io::Read; use super::common::TestCase; use super::get_library; +use std::fs::File; +use std::io::Read; +use std::path::Path; fn integration_tests(input: &Path) { let mut str: String = "".to_string(); @@ -15,10 +15,7 @@ fn integration_tests(input: &Path) { test_case.run_test(get_library()); } - #[test] fn basic_single_turn() { integration_tests(Path::new("tests/test_cases/basic_single_turn.yaml")); } - - \ No newline at end of file