You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[parameterized( text = {"aaa","bab","😃bc"}, expected = {'a','b','😃'})]fntest_peek_first_chars(text:&str,expected:char){assert_eq!(text.peek_first(), expected);}
declared case by case:
#[parameterized'( triple_a = {"aaa",'a',}, bab = {"bab",'b',}, emoji = { text:"😃ab",// optionally named, but original order should be preserved for consistency expected:'😃'})]fntest_peek_first_chars(text:&str,expected:char){assert_eq!(text.peek_first(), expected);}
Advantages
trivial to define test case naming
potentially declaring a lot of test argument identifiers on test case declaration (that's why making them optional is a good idea I think)
Disadvantages:
similar test case data spread out more
potentially huge attribute declarations, with nesting which makes it potentially harder to read
The text was updated successfully, but these errors were encountered:
Current:
declared case by case:
Advantages
Disadvantages:
The text was updated successfully, but these errors were encountered: