Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 39 lines (26 sloc) 0.936 kb
c2b31f8c » moritz
2008-09-02 [t] move junction tests to spec/, make them not rely on the internal …
1 use v6;
2
3 use Test;
4
643bc98f » mberends
2010-08-22 replace plan *; with number of tests S03
5 plan 10;
c2b31f8c » moritz
2008-09-02 [t] move junction tests to spec/, make them not rely on the internal …
6
7 # Checking Junctions' Associativeness
8 # TODO: need smartlink
9
8f9a1198 » lwall
2009-11-25 [t/] unify compartmentalized undef and Object concepts into Mu
10 sub jv(Mu $j) {
46b247a9 » moritz
2009-11-01 [t/spec] clean up some junction testing mess
11 my @e;
12 (-> Any $x { @e.push: $x }).($j);
13 return @e.sort.join(' ');
c2b31f8c » moritz
2008-09-02 [t] move junction tests to spec/, make them not rely on the internal …
14 }
15
16 # L<S03/"Junctive operators">
17 # L<S09/"Junctions">
18 {
19
20 is('1 2 3', jv((1|2)|3), "Left-associative any, | operator");
cdd6f778 » moritz
2008-09-03 [t/spec] added missing comma, TimToady++
21 is('1 2 3', jv(1|(2|3)), "Right-associative any, | operator");
c2b31f8c » moritz
2008-09-02 [t] move junction tests to spec/, make them not rely on the internal …
22
23 is('1 2 3', jv(any(any(1,2),3)), "Left-associative any()");
24 is('1 2 3', jv(any(1,any(2,3))), "Right-associative any()");
25
26 is('1 2 3', jv((1&2)&3), "Left-associative all, & operator");
27 is('1 2 3', jv(1&(2&3)), "Right-associative all, & operator");
28
29 is('1 2 3', jv(all(all(1,2),3)), "Left-associative all()");
30 is('1 2 3', jv(all(1,all(2,3))), "Right-associative all()");
31
32 is('1 2 3', jv(none(none(1,2),3)), "Left-associative none()");
33 is('1 2 3', jv(none(1,none(2,3))), "Right-associative none()");
34
35 }
36
e76dd4c7 » moritz
2010-12-31 s/done_testing/done/ as per recent S24 changes
37 done();
46b247a9 » moritz
2009-11-01 [t/spec] clean up some junction testing mess
38
c2b31f8c » moritz
2008-09-02 [t] move junction tests to spec/, make them not rely on the internal …
39 # vim: ft=perl6
Something went wrong with that request. Please try again.