Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 40 lines (26 sloc) 0.936 kb
c2b31f8 [t] move junction tests to spec/, make them not rely on the internal …
moritz authored
1 use v6;
2
3 use Test;
4
643bc98 replace plan *; with number of tests S03
mberends authored
5 plan 10;
c2b31f8 [t] move junction tests to spec/, make them not rely on the internal …
moritz authored
6
7 # Checking Junctions' Associativeness
8 # TODO: need smartlink
9
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
10 sub jv(Mu $j) {
46b247a [t/spec] clean up some junction testing mess
moritz authored
11 my @e;
12 (-> Any $x { @e.push: $x }).($j);
13 return @e.sort.join(' ');
c2b31f8 [t] move junction tests to spec/, make them not rely on the internal …
moritz authored
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");
cdd6f77 [t/spec] added missing comma, TimToady++
moritz authored
21 is('1 2 3', jv(1|(2|3)), "Right-associative any, | operator");
c2b31f8 [t] move junction tests to spec/, make them not rely on the internal …
moritz authored
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
e76dd4c @moritz s/done_testing/done/ as per recent S24 changes
moritz authored
37 done();
46b247a [t/spec] clean up some junction testing mess
moritz authored
38
c2b31f8 [t] move junction tests to spec/, make them not rely on the internal …
moritz authored
39 # vim: ft=perl6
Something went wrong with that request. Please try again.