📃 datafile-test
This crate provides a macro for data file driven test. The macro generates a test function for each entry in the data file and runs the test function for each entry.
Usage
Use datafile_test attribute macro to define a test function.
Note that this macro requires the serde and serde_json crate to be available.
use datafile_test;
This code will generate a test function for each entry in the data file tests/datafile_test.json.
The data file should be a JSON or YAML file containing an array of objects like this:
License
The code follows the MIT license written in LICENSE. Contributors need to agree that any modifications sent to this repository follow the license.