Function brane_shr::utilities::test_on_dsl_files_in
source · pub fn test_on_dsl_files_in<F>(
mode: &'static str,
path: impl AsRef<Path>,
exec: F,
)
Expand description
Runs a given closure on all files in the given folder.
§Generic arguments
F
: The function signature of the closure. It simply accepts the path and source text of a single file, and returns nothing. Instead, it can panic if the test fails.
§Arguments
mode
: The mode to run in. May either be ‘BraneScript’ or ‘Bakery’.path
: The path to search for files in.exec
: The closure that runs code on every file in the appropriate language’s text.
§Panics
This function panics if the test failed (i.e., if the files could not be found or the closure panics).