Skip to content

Commit d68dbbf

Browse files
committed
Update a couple of tests for Order enum.
1 parent 0b697d8 commit d68dbbf

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

S29-any/cmp.t

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ plan 6;
55

66
# L<S32::Basics/Any/"=item cmp">
77

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');
1111

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');
1515

1616
# vim: ft=perl6

S32-temporal/Date.t

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ sub d($x) { Date.new($x); }
105105
ok $b > $a, '> (+)';
106106
nok $a > $b, '> (-)';
107107

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)';
111111

112112

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)';
116116
}
117117

118118
done;

0 commit comments

Comments
 (0)