Skip to content

Test Names

luke.biel edited this page Feb 13, 2022 · 1 revision

test_case has to generate test name for each test case provided. It uses either test comment if it's present or test arguments and outputs otherwise.

Eg.:

#[test_case(2, 7)]
#[test_case(2, 7 ; "2nd test")]
fn name(x: u32, y: u32) { }

produces

test test_cases::name::_2_7_expects ... ok
test test_cases::name::_2nd_test ... ok

Clone this wiki locally