@@ -50,9 +50,9 @@ fn test_reqopt() {
50
50
let short_args = vec ! [ "-t" . to_string( ) , "20" . to_string( ) ] ;
51
51
match opts. parse ( & short_args) {
52
52
Ok ( ref m) => {
53
- assert ! ( ( m. opt_present( "test" ) ) ) ;
53
+ assert ! ( m. opt_present( "test" ) ) ;
54
54
assert_eq ! ( m. opt_str( "test" ) . unwrap( ) , "20" ) ;
55
- assert ! ( ( m. opt_present( "t" ) ) ) ;
55
+ assert ! ( m. opt_present( "t" ) ) ;
56
56
assert_eq ! ( m. opt_str( "t" ) . unwrap( ) , "20" ) ;
57
57
}
58
58
_ => {
@@ -111,17 +111,17 @@ fn test_optopt() {
111
111
Ok ( ref m) => {
112
112
assert ! ( m. opt_present( "test" ) ) ;
113
113
assert_eq ! ( m. opt_str( "test" ) . unwrap( ) , "20" ) ;
114
- assert ! ( ( m. opt_present( "t" ) ) ) ;
114
+ assert ! ( m. opt_present( "t" ) ) ;
115
115
assert_eq ! ( m. opt_str( "t" ) . unwrap( ) , "20" ) ;
116
116
}
117
117
_ => panic ! ( ) ,
118
118
}
119
119
let short_args = vec ! [ "-t" . to_string( ) , "20" . to_string( ) ] ;
120
120
match opts. parse ( & short_args) {
121
121
Ok ( ref m) => {
122
- assert ! ( ( m. opt_present( "test" ) ) ) ;
122
+ assert ! ( m. opt_present( "test" ) ) ;
123
123
assert_eq ! ( m. opt_str( "test" ) . unwrap( ) , "20" ) ;
124
- assert ! ( ( m. opt_present( "t" ) ) ) ;
124
+ assert ! ( m. opt_present( "t" ) ) ;
125
125
assert_eq ! ( m. opt_str( "t" ) . unwrap( ) , "20" ) ;
126
126
}
127
127
_ => panic ! ( ) ,
@@ -443,19 +443,19 @@ fn test_optmulti() {
443
443
opts. optmulti ( "t" , "test" , "testing" , "TEST" ) ;
444
444
match opts. parse ( & long_args) {
445
445
Ok ( ref m) => {
446
- assert ! ( ( m. opt_present( "test" ) ) ) ;
446
+ assert ! ( m. opt_present( "test" ) ) ;
447
447
assert_eq ! ( m. opt_str( "test" ) . unwrap( ) , "20" ) ;
448
- assert ! ( ( m. opt_present( "t" ) ) ) ;
448
+ assert ! ( m. opt_present( "t" ) ) ;
449
449
assert_eq ! ( m. opt_str( "t" ) . unwrap( ) , "20" ) ;
450
450
}
451
451
_ => panic ! ( ) ,
452
452
}
453
453
let short_args = vec ! [ "-t" . to_string( ) , "20" . to_string( ) ] ;
454
454
match opts. parse ( & short_args) {
455
455
Ok ( ref m) => {
456
- assert ! ( ( m. opt_present( "test" ) ) ) ;
456
+ assert ! ( m. opt_present( "test" ) ) ;
457
457
assert_eq ! ( m. opt_str( "test" ) . unwrap( ) , "20" ) ;
458
- assert ! ( ( m. opt_present( "t" ) ) ) ;
458
+ assert ! ( m. opt_present( "t" ) ) ;
459
459
assert_eq ! ( m. opt_str( "t" ) . unwrap( ) , "20" ) ;
460
460
}
461
461
_ => panic ! ( ) ,
@@ -576,16 +576,16 @@ fn test_combined() {
576
576
assert ! ( m. free[ 1 ] == "free1" ) ;
577
577
assert_eq ! ( m. opt_str( "s" ) . unwrap( ) , "20" ) ;
578
578
assert ! ( m. free[ 2 ] == "free2" ) ;
579
- assert ! ( ( m. opt_present( "flag" ) ) ) ;
579
+ assert ! ( m. opt_present( "flag" ) ) ;
580
580
assert_eq ! ( m. opt_str( "long" ) . unwrap( ) , "30" ) ;
581
- assert ! ( ( m. opt_present( "f" ) ) ) ;
581
+ assert ! ( m. opt_present( "f" ) ) ;
582
582
let pair = m. opt_strs ( "m" ) ;
583
583
assert ! ( pair[ 0 ] == "40" ) ;
584
584
assert ! ( pair[ 1 ] == "50" ) ;
585
585
let pair = m. opt_strs ( "n" ) ;
586
586
assert ! ( pair[ 0 ] == "-A B" ) ;
587
587
assert ! ( pair[ 1 ] == "-60 70" ) ;
588
- assert ! ( ( !m. opt_present( "notpresent" ) ) ) ;
588
+ assert ! ( !m. opt_present( "notpresent" ) ) ;
589
589
}
590
590
_ => panic ! ( ) ,
591
591
}
0 commit comments