Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 28 lines (18 sloc) 0.579 kb
58135b3 [t/spec] changed 'use v6-alpha;' to 'use v6;'
moritz authored
1 use v6;
8a1a068 Some initial test refactors and cleanups for basic operators.
pmichaud authored
2 use Test;
3
4 plan 9;
5
6 # N.B.: relational ops are in relational.t
7
8 #L<S03/Comparison semantics>
9
10 # spaceship comparisons (Num)
11 is(1 <=> 1, 0, '1 <=> 1 is same');
12 is(1 <=> 2, -1, '1 <=> 2 is increase');
13 is(2 <=> 1, 1, '2 <=> 1 is decrease');
14
15 # leg comparison (Str)
16 is('a' leg 'a', 0, 'a leg a is same');
17 is('a' leg 'b', -1, 'a leg b is increase');
18 is('b' leg 'a', 1, 'b leg a is decrease');
19
20 #L<S03/Comparison semantics>
21
22 # cmp comparison
23 is('a' cmp 'a', 0, 'a cmp a is same');
24 is('a' cmp 'b', -1, 'a cmp b is increase');
25 is('b' cmp 'a', 1, 'b cmp a is decrease');
26
27
Something went wrong with that request. Please try again.