Function brane_shr::utilities::test_on_dsl_files
source · pub fn test_on_dsl_files<F>(mode: &'static str, exec: F)
Expand description
Runs a given closure on all files in the tests
folder (see the constant defined in this function’s source file).
§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’.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).