#[case]
Expand description
Generates tests for given set of data
In general, test case consists of four elements:
- (Required) Arguments passed to test body
- (Optional) Expected result
- (Optional) Test case description
- (Required) Test body
When expected result is provided, it is compared against the actual value generated with test body using assert_eq!
.
Test cases that don’t provide expected result should contain custom assertions within test body or return Result
similar to #[test]
macro.