macro_rules! test_file_test_with_runner { ($suite:ident, $base_dir:expr, { $($test_name:ident : $test_file:expr),* $(,)? }, $runner:ident) => { ... }; }
Expand description
Creates a test that reads test files for a given function.
test_name - the name of the test.
filenames - a vector of tests files the test applies to.
runner - the struct implementing TestFileRunner + Default
.
The structure of the file must be of the following form:
//! > test description
//! > test_runner_name
TestToUpperRunner
//! > input1
hello
//! > input2
world
//! > expected_output1
HELLO
//! > expected_output2
WORLD
//! > ==========================================================================
<another test>
The call to the macro looks like:
ⓘ
test_file_test_with_runner!(
test_suite_name,
"path/to/test/dir",
{
test_name1: "test_file1",
test_name2: "test_file2",
},
TestToUpperRunner
);