Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 72 lines (59 sloc) 2.534 kb
58135b30 »
2008-05-08 [t/spec] changed 'use v6-alpha;' to 'use v6;'
1 use v6;
8a1a0683 »
2008-01-02 Some initial test refactors and cleanups for basic operators.
2 use Test;
3
942eb9ed »
2012-05-17 remove another wrong numification test
4 plan 41;
8a1a0683 »
2008-01-02 Some initial test refactors and cleanups for basic operators.
5
6 # N.B.: relational ops are in relational.t
7
3a5af165 »
2013-11-08 Increase/Decrease -> Less/More migration
8 # L<S03/Nonchaining binary precedence/Order::Less, Order::Same, or Order::More>
9 is(+Order::Less, -1, 'Order::Less numifies to -1');
10 is(+Order::Same, 0, 'Order::Same numifies to 0');
11 is(+Order::More, 1, 'Order::More numifies to 1');
b877b807 »
2008-06-27 [gsoc_spectest] Added more cmp, leg, and <=> tests. Tested the values…
12
8a1a0683 »
2008-01-02 Some initial test refactors and cleanups for basic operators.
13 #L<S03/Comparison semantics>
14
15 # spaceship comparisons (Num)
3a5af165 »
2013-11-08 Increase/Decrease -> Less/More migration
16 is(1 <=> 1, Order::Same, '1 <=> 1 is same');
17 is(1 <=> 2, Order::Less, '1 <=> 2 is less');
18 is(2 <=> 1, Order::More, '2 <=> 1 is more');
8a1a0683 »
2008-01-02 Some initial test refactors and cleanups for basic operators.
19
3a5af165 »
2013-11-08 Increase/Decrease -> Less/More migration
20 is 0 <=> -1, Order::More, '0 <=> -1 is less';
21 is -1 <=> 0, Order::Less, '-1 <=> 0 is more';
22 is 0 <=> -1/2, Order::More, '0 <=> -1/2 is more';
23 is 0 <=> 1/2, Order::Less, '0 <=> 1/2 is less';
24 is -1/2 <=> 0, Order::Less, '-1/2 <=> 0 is more';
25 is 1/2 <=> 0, Order::More, '1/2 <=> 0 is more';
6a6e12a9 »
2009-11-20 [t/spec] Test for RT 70664: Try <=> with rationals
26 is 1/2 <=> 1/2, Order::Same, '1/2 <=> 1/2 is same';
27 is -1/2 <=> -1/2, Order::Same, '-1/2 <=> -1/2 is same';
3a5af165 »
2013-11-08 Increase/Decrease -> Less/More migration
28 is 1/2 <=> -1/2, Order::More, '1/2 <=> -1/2 is more';
29 is -1/2 <=> 1/2, Order::Less, '-1/2 <=> 1/2 is less';
6a6e12a9 »
2009-11-20 [t/spec] Test for RT 70664: Try <=> with rationals
30
8a1a0683 »
2008-01-02 Some initial test refactors and cleanups for basic operators.
31 # leg comparison (Str)
3a5af165 »
2013-11-08 Increase/Decrease -> Less/More migration
32 is('a' leg 'a', Order::Same, 'a leg a is same');
33 is('a' leg 'b', Order::Less, 'a leg b is less');
34 is('b' leg 'a', Order::More, 'b leg a is more');
35 is('a' leg 1, Order::More, 'leg is in string context');
36 is("a" leg "a\0", Order::Less, 'a leg a\0 is less');
0312dc02 »
2010-03-16 [comparison.t] add some tests involving \0
37 is("a\0" leg "a\0", Order::Same, 'a\0 leg a\0 is same');
3a5af165 »
2013-11-08 Increase/Decrease -> Less/More migration
38 is("a\0" leg "a", Order::More, 'a\0 leg a is more');
8a1a0683 »
2008-01-02 Some initial test refactors and cleanups for basic operators.
39
40 # cmp comparison
3a5af165 »
2013-11-08 Increase/Decrease -> Less/More migration
41 is('a' cmp 'a', Order::Same, 'a cmp a is same');
42 is('a' cmp 'b', Order::Less, 'a cmp b is less');
43 is('b' cmp 'a', Order::More, 'b cmp a is more');
44 is(1 cmp 1, Order::Same, '1 cmp 1 is same');
45 is(1 cmp 2, Order::Less, '1 cmp 2 is less');
46 is(2 cmp 1, Order::More, '2 cmp 1 is more');
47 is('a' cmp 1, Order::More, '"a" cmp 1 is more'); # unspecced P5 behavior
48 is("a" cmp "a\0", Order::Less, 'a cmp a\0 is less');
0312dc02 »
2010-03-16 [comparison.t] add some tests involving \0
49 is("a\0" cmp "a\0", Order::Same, 'a\0 cmp a\0 is same');
3a5af165 »
2013-11-08 Increase/Decrease -> Less/More migration
50 is("a\0" cmp "a", Order::More, 'a\0 cmp a is more');
7f29bc53 »
2009-08-08 [t/spec] Add vim: lines everywhere.
51
6d2e28d4 »
2010-09-03 [t/spec] Add tricky tests (which pass after latest Rakudo patch), unf…
52 # compare numerically with non-numeric
53 {
54 class Blue {
fa413e28 »
2012-01-04 Change the "Blue" tests to use an Int instead of a Complex, reflectin…
55 method Numeric() { 3; }
7daa89cd »
2014-02-26 RT #121326: correct and unfudge tests
56 method Real() { 3; }
6d2e28d4 »
2010-09-03 [t/spec] Add tricky tests (which pass after latest Rakudo patch), unf…
57 }
58 my $a = Blue.new;
59
fa413e28 »
2012-01-04 Change the "Blue" tests to use an Int instead of a Complex, reflectin…
60 ok +$a == 3, '+$a == 3 (just checking)';
61 ok $a == 3, '$a == 3';
62 ok $a != 4, '$a != 4';
63 nok $a != 3, 'not true that $a != 3';
7daa89cd »
2014-02-26 RT #121326: correct and unfudge tests
64
6d2e28d4 »
2010-09-03 [t/spec] Add tricky tests (which pass after latest Rakudo patch), unf…
65 lives_ok { $a < 5 }, '$a < 5 lives okay';
66 lives_ok { $a <= 5 }, '$a <= 5 lives okay';
67 lives_ok { $a > 5 }, '$a > 5 lives okay';
68 lives_ok { $a >= 5 }, '$a => 5 lives okay';
69 }
6a6e12a9 »
2009-11-20 [t/spec] Test for RT 70664: Try <=> with rationals
70
7f29bc53 »
2009-08-08 [t/spec] Add vim: lines everywhere.
71 # vim: ft=perl6
Something went wrong with that request. Please try again.