Attribute Macro test_case::test_matrix
source · #[test_matrix]
Expand description
Generates tests for the cartesian product of a given set of data
A test matrix consists of four elements:
- (Required) Sets of values to combine; the number of sets must be the same as the number of arguments to the test body function
- (Optional) Expected result (for all combinations of values)
- (Optional) Test case description (applied as a prefix the generated name of the test)
- (Required) Test body
Expected result and Test body are the same as they are for the singular #[test_case(...)]
macro but are applied to every case generated by #[test_matrix(...)]
.