Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 30 lines (21 sloc) 0.691 kB
a238d44 [t/spec] rename true to so
lwall authored
1 use v6;
2 use Test;
d6f41fb @moritz test for RT #78788
moritz authored
3 plan 15;
a238d44 [t/spec] rename true to so
lwall authored
4
5 # L<S03/Loose unary precedence>
6
7 ok(so 1, "so 1 is true");
8 ok(so -1, "so -1 is true");
9 ok(not so 0, "not so 0 is true");
10 ok(so sub{}, 'so sub{} is true');
11 ok(so "x", 'so "x" is true');
12
13 my $a = 1; ok(so $a, 'so $true_var is true');
14 my $b = 0; ok(!(so $b), 'so $false_var is not true');
15
16 ok( so(so 42), "so(so 42) is true");
17 ok(not so(so 0), "so(so 0) is false");
18
19 ok(so Bool::True, "'Bool::True' is true");
4bdf17e @coke Convert niecza faux-todo to real todo.
coke authored
20 #?niecza todo
d6f41fb @moritz test for RT #78788
moritz authored
21 ok Bool.so === False, 'Bool.so returns false';
a238d44 [t/spec] rename true to so
lwall authored
22 ok(so True, "'True' is true");
23
5406915 [t/spec] Additional test for so. New test file for !op metaop. Move…
colomon authored
24 is (so($b) + 1), ((so $b) + 1), 'so($b) is (so $b)';
25
00b57a5 [t/spec] so my $x = 3, RT #73352
moritz authored
26 ok (so my $x = 5), 'so + declaration';
27 is $x, 5, 'assignment after so worked';
28
ea847c7 @moritz remove more wrong uses of True and False as 0 and 1 (still more left)…
moritz authored
29 # vim: ft=perl6
Something went wrong with that request. Please try again.