Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 74 lines (61 sloc) 2.81 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
6d2e28d4 »
2010-09-03 [t/spec] Add tricky tests (which pass after latest Rakudo patch), unf…
4 plan 42;
8a1a0683 »
2008-01-02 Some initial test refactors and cleanups for basic operators.
5
6 # N.B.: relational ops are in relational.t
7
b877b807 »
2008-06-27 [gsoc_spectest] Added more cmp, leg, and <=> tests. Tested the values…
8 # L<S03/Nonchaining binary precedence/Order::Increase, Order::Same, or Order::Decrease>
9 is(+Order::Increase, -1, 'Order::Increase numifies to -1');
10 is(+Order::Same, 0, 'Order::Same numifies to 0');
497b3920 »
2009-01-27 [comparison.t] typo spotted by oskie++
11 is(+Order::Decrease, 1, 'Order::Decrease 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)
b877b807 »
2008-06-27 [gsoc_spectest] Added more cmp, leg, and <=> tests. Tested the values…
16 is(1 <=> 1, Order::Same, '1 <=> 1 is same');
17 is(1 <=> 2, Order::Increase, '1 <=> 2 is increase');
18 is(2 <=> 1, Order::Decrease, '2 <=> 1 is decrease');
fa413e28 »
2012-01-04 Change the "Blue" tests to use an Int instead of a Complex, reflectin…
19 #?niecza skip 'Cannot parse number: a'
b877b807 »
2008-06-27 [gsoc_spectest] Added more cmp, leg, and <=> tests. Tested the values…
20 is('a' <=> '1', Order::Increase, '<=> is in numeric context');
8a1a0683 »
2008-01-02 Some initial test refactors and cleanups for basic operators.
21
6a6e12a9 »
2009-11-20 [t/spec] Test for RT 70664: Try <=> with rationals
22 is 0 <=> -1, Order::Decrease, '0 <=> -1 is increase';
23 is -1 <=> 0, Order::Increase, '-1 <=> 0 is decrease';
6d2e28d4 »
2010-09-03 [t/spec] Add tricky tests (which pass after latest Rakudo patch), unf…
24 is 0 <=> -1/2, Order::Decrease, '0 <=> -1/2 is decrease';
6a6e12a9 »
2009-11-20 [t/spec] Test for RT 70664: Try <=> with rationals
25 is 0 <=> 1/2, Order::Increase, '0 <=> 1/2 is increase';
26 is -1/2 <=> 0, Order::Increase, '-1/2 <=> 0 is decrease';
27 is 1/2 <=> 0, Order::Decrease, '1/2 <=> 0 is decrease';
28 is 1/2 <=> 1/2, Order::Same, '1/2 <=> 1/2 is same';
29 is -1/2 <=> -1/2, Order::Same, '-1/2 <=> -1/2 is same';
30 is 1/2 <=> -1/2, Order::Decrease, '1/2 <=> -1/2 is decrease';
31 is -1/2 <=> 1/2, Order::Increase, '-1/2 <=> 1/2 is increase';
32
8a1a0683 »
2008-01-02 Some initial test refactors and cleanups for basic operators.
33 # leg comparison (Str)
b877b807 »
2008-06-27 [gsoc_spectest] Added more cmp, leg, and <=> tests. Tested the values…
34 is('a' leg 'a', Order::Same, 'a leg a is same');
35 is('a' leg 'b', Order::Increase, 'a leg b is increase');
36 is('b' leg 'a', Order::Decrease, 'b leg a is decrease');
37 is('a' leg 1, Order::Decrease, 'leg is in string context');
0312dc02 »
2010-03-16 [comparison.t] add some tests involving \0
38 is("a" leg "a\0", Order::Increase, 'a leg a\0 is increase');
39 is("a\0" leg "a\0", Order::Same, 'a\0 leg a\0 is same');
40 is("a\0" leg "a", Order::Decrease, 'a\0 leg a is decrease');
8a1a0683 »
2008-01-02 Some initial test refactors and cleanups for basic operators.
41
42 # cmp comparison
b877b807 »
2008-06-27 [gsoc_spectest] Added more cmp, leg, and <=> tests. Tested the values…
43 is('a' cmp 'a', Order::Same, 'a cmp a is same');
44 is('a' cmp 'b', Order::Increase, 'a cmp b is increase');
45 is('b' cmp 'a', Order::Decrease, 'b cmp a is decrease');
46 is(1 cmp 1, Order::Same, '1 cmp 1 is same');
47 is(1 cmp 2, Order::Increase, '1 cmp 2 is increase');
48 is(2 cmp 1, Order::Decrease, '2 cmp 1 is decrease');
49 is('a' cmp 1, Order::Decrease, '"a" cmp 1 is decrease'); # unspecced but P5 behavior
0312dc02 »
2010-03-16 [comparison.t] add some tests involving \0
50 is("a" cmp "a\0", Order::Increase, 'a cmp a\0 is increase');
51 is("a\0" cmp "a\0", Order::Same, 'a\0 cmp a\0 is same');
52 is("a\0" cmp "a", Order::Decrease, 'a\0 cmp a is decrease');
7f29bc53 »
2009-08-08 [t/spec] Add vim: lines everywhere.
53
6d2e28d4 »
2010-09-03 [t/spec] Add tricky tests (which pass after latest Rakudo patch), unf…
54 # compare numerically with non-numeric
55 {
56 class Blue {
fa413e28 »
2012-01-04 Change the "Blue" tests to use an Int instead of a Complex, reflectin…
57 method Numeric() { 3; }
6d2e28d4 »
2010-09-03 [t/spec] Add tricky tests (which pass after latest Rakudo patch), unf…
58 }
59 my $a = Blue.new;
60
fa413e28 »
2012-01-04 Change the "Blue" tests to use an Int instead of a Complex, reflectin…
61 ok +$a == 3, '+$a == 3 (just checking)';
62 ok $a == 3, '$a == 3';
63 ok $a != 4, '$a != 4';
64 nok $a != 3, 'not true that $a != 3';
6d2e28d4 »
2010-09-03 [t/spec] Add tricky tests (which pass after latest Rakudo patch), unf…
65
cf895c79 »
2012-01-15 nom fudging
66 #?rakudo 4 todo 'nom regression'
6d2e28d4 »
2010-09-03 [t/spec] Add tricky tests (which pass after latest Rakudo patch), unf…
67 lives_ok { $a < 5 }, '$a < 5 lives okay';
68 lives_ok { $a <= 5 }, '$a <= 5 lives okay';
69 lives_ok { $a > 5 }, '$a > 5 lives okay';
70 lives_ok { $a >= 5 }, '$a => 5 lives okay';
71 }
6a6e12a9 »
2009-11-20 [t/spec] Test for RT 70664: Try <=> with rationals
72
7f29bc53 »
2009-08-08 [t/spec] Add vim: lines everywhere.
73 # vim: ft=perl6
Something went wrong with that request. Please try again.