Macro libktx_rs_macros::file_tests [−][src]
file_tests!() { /* proc-macro */ }
Expand description
Collects a list of files at compile time (!), then generates a test case for each one of them.
The test case will invoke a given function, passing it the std::path::PathBuf
to it and the open std::fs::File
.
ⓘ
file_tests!(test_fn => "glob", !"glob", ...);
For each file matching the given glob pattern[s] (at compile time!), generates a #[test]
that invokes
ⓘ
fn test_fn(file: std::fs::File);
Globs preceded by !
are inverted (matches are removed).