File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ plan 6;
5
5
6
6
# L<S32::Basics/Any/"=item cmp">
7
7
8
- is (' a' cmp ' a' , 0 , ' a is equal to a' );
9
- is (' a' cmp ' b' , -1 , ' a is less than b' );
10
- is (' b' cmp ' a' , 1 , ' b is greater than a' );
8
+ is (' a' cmp ' a' , Order ::Same, ' a is equal to a' );
9
+ is (' a' cmp ' b' , Order ::Increase, ' a is less than b' );
10
+ is (' b' cmp ' a' , Order ::Decrease , ' b is greater than a' );
11
11
12
- is (3 cmp 3 , 0 , ' 3 cmp 3 is 0' );
13
- is (2 cmp 3 , -1 , ' 2 cmp 3 is -1' );
14
- is (3 cmp 4 , -1 , ' 3 cmp 4 is -1' );
12
+ is (3 cmp 3 , Order ::Same, ' 3 cmp 3 is 0' );
13
+ is (2 cmp 3 , Order ::Increase , ' 2 cmp 3 is -1' );
14
+ is (3 cmp 4 , Order ::Increase , ' 3 cmp 4 is -1' );
15
15
16
16
# vim: ft=perl6
Original file line number Diff line number Diff line change @@ -105,14 +105,14 @@ sub d($x) { Date.new($x); }
105
105
ok $ b > $ a , ' > (+)' ;
106
106
nok $ a > $ b , ' > (-)' ;
107
107
108
- is $ a cmp $ a , 0 , ' cmp ( 0)' ;
109
- is $ a cmp $ b , -1 , ' cmp (-1)' ;
110
- is $ c cmp $ a , 1 , ' cmp (+1)' ;
108
+ is $ a cmp $ a , Order ::Same, ' cmp ( 0)' ;
109
+ is $ a cmp $ b , Order ::Increase , ' cmp (-1)' ;
110
+ is $ c cmp $ a , Order ::Decrease , ' cmp (+1)' ;
111
111
112
112
113
- is $ a <= > $ a , 0 , ' <=> ( 0)' ;
114
- is $ a <= > $ b , -1 , ' <=> (-1)' ;
115
- is $ c <= > $ a , 1 , ' <=> (+1)' ;
113
+ is $ a <= > $ a , Order ::Same, ' <=> ( 0)' ;
114
+ is $ a <= > $ b , Order ::Increase , ' <=> (-1)' ;
115
+ is $ c <= > $ a , Order ::Decrease , ' <=> (+1)' ;
116
116
}
117
117
118
118
done ;
You can’t perform that action at this time.
0 commit comments