diff --git a/lykiadb-server/tests/tests.rs b/lykiadb-server/tests/tests.rs index 9f99d34e..0c02f139 100644 --- a/lykiadb-server/tests/tests.rs +++ b/lykiadb-server/tests/tests.rs @@ -1,8 +1,10 @@ #![recursion_limit = "192"] -use util::run_test; -use test_each_file::test_each_file; mod runtime; mod util; +mod planner { + use test_each_file::test_each_file; + use crate::util::run_test; -test_each_file! { in "lykiadb-server/tests/planner" => run_test } + test_each_file! { in "lykiadb-server/tests/planner" => run_test } +} diff --git a/lykiadb-server/tests/util.rs b/lykiadb-server/tests/util.rs index 09be7917..15a2db19 100644 --- a/lykiadb-server/tests/util.rs +++ b/lykiadb-server/tests/util.rs @@ -1,5 +1,5 @@ use lykiadb_lang::{ast::stmt::Stmt, parser::program::Program}; -use lykiadb_server::plan::planner::Planner; +use lykiadb_server::{assert_plan, plan::planner::Planner}; use pretty_assertions::assert_eq; fn expect_plan(query: &str, expected_plan: &str) { @@ -24,6 +24,6 @@ pub fn run_test(input: &str) { let directives_end = directives_and_input.find('>').unwrap_or(directives_and_input.len()); let rest = directives_and_input[directives_end+1..].trim().to_string(); let io_parts: Vec<&str> = rest.split("---").collect(); - expect_plan(&io_parts[0].trim(),&io_parts[1].trim()); + expect_plan(&io_parts[0].trim(),&io_parts[1].trim()); } } \ No newline at end of file