-
Notifications
You must be signed in to change notification settings - Fork 40
Getting Started
luke.biel edited this page Feb 13, 2022
·
2 revisions
- Add test-case to your project Cargo.toml:
test-case = "*"- Import
test_caseto the scope you are using it in:
use test_case::test_case;Rust introduced it's own
test_caseto the stdlib. Due to that we must either use fully qualified pathtest_case::test_caseor importtest_casemacro to the scope.
- Add test cases to your function
#[test_case(input => output_matcher ; "optional comment")]
fn testing_function(input: Type) -> ResultType {
body!()
}Test case syntax can be found here