test_case

Attribute Macro test_matrix

#[test_matrix]
Expand description

Generates tests for the cartesian product of a given set of data

A test matrix consists of three elements:

  1. (Required) Sets of values to combine; the nubmer of sets must be the same as the number of arguments to the test body function
  2. (Optional) Expected result (for all combinations of values)
  3. (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(...)]. Test case description is not allowed for test_matrix, because test case names are auto-generated from the test body function name and matrix values.