Permalink
Browse files

[fudge] more sub counting tweaks

*.t removed colon from #? lines


git-svn-id: http://svn.pugscode.org/pugs@19649 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent a73aff0 commit f60ff61d5e0da060294dde7fc7c14072dd287338 lwall committed Jan 23, 2008
View
@@ -21,7 +21,7 @@ is( :10<42>, 0d42, ':10<42> and 0d42 are the same' );
# L<S02/Literals/"Think of these as setting the default radix">
# setting the default radix
-#?pugs: todo 'feature'
+#?pugs todo 'feature'
{
is(:10(0b1110), 0d14, ':10(0b1110) converts from binary');
is(:10(0x20), 0d32, ':10(0x20) converts from hexadecimal');
@@ -85,8 +85,8 @@ is(:16<0b1110>, 0xB1110, ':16<0b1110> uses b as hex digit' );
is(:16<0d37>, 0x0D37, ':16<0d37> uses d as hex digit' );
# L<S02/Literals/"Think of these as setting the default radix">
-#?rakudo: todo 'feature'
-#?pugs: todo :by<6.28>
+#?rakudo todo 'feature'
+#?pugs todo :by<6.28>
{
is(:16<0x20>, 0d32, ':16<0x20> stays hexadecimal');
is(:16<0o377>, 0d255, ':16<0o255> converts from octal');
@@ -95,7 +95,7 @@ is(:16<0d37>, 0x0D37, ':16<0d37> uses d as hex digit' );
# L<S02/Literals/"which will be interpreted as they would outside the string">
# It seems odd that the numbers on the inside on the <> would be a mix of
# bases. Maybe I've misread the paragraph -- brian
-#?pugs: todo 'feature'
+#?pugs todo 'feature'
{
is(:16<dead_beef> * 16**8, :16<dead_beef*16**8>,
'Powers outside same as powers inside');
@@ -138,8 +138,8 @@ is(:8<177777>, 65535, 'got the correct int value from oct 177777');
# L<S02/Literals/"Think of these as setting the default radix">
# setting the default radix
-#?rakudo: todo 'feature'
-#?pugs: todo 'feature'
+#?rakudo todo 'feature'
+#?pugs todo 'feature'
{
is(:8(0b1110), 0d14, ':8(0b1110) converts from binary');
is(:8(0x20), 0d32, ':8(0x20) converts from hexadecimal');
@@ -155,7 +155,7 @@ is(:2(1), 1, 'got the correct int value from bin 1');
is(:2(10), 2, 'got the correct int value from bin 10');
is(:2(1010), 10, 'got the correct int value from bin 1010');
-#?rakudo: 1 skip "can't parse"
+#?rakudo 1 skip "can't parse"
is(
:2(11111111111111111111111111111111),
0xFFFFFFFF,
@@ -165,7 +165,7 @@ is(
# L<S02/Literals/"Think of these as setting the default radix">
# setting the default radix
-#?pugs: todo 'feature'
+#?pugs todo 'feature'
{
is(:2<0b1110>, 0d14, ':2<0b1110> stays binary');
is(:2<0x20>, 0d32, ':2<0x20> converts from hexadecimal');
@@ -174,20 +174,20 @@ is(
}
# L<S02/Literals/"not clear whether the exponentiator should be 10 or the radix">
-#?rakudo: 1 skip "can't parse"
+#?rakudo 1 skip "can't parse"
isnt( eval("0b1.1e10"), 1536, 'Ambiguous, illegal syntax doesn\'t work' );
# L<S02/Literals/"and this makes it explicit">
# probably don't need a test, but I'll write tests for any example :)
-#?rakudo: 3 skip "can't parse"
+#?rakudo 3 skip "can't parse"
is( :2<1.1> * 2 ** 10, 1536, 'binary number to power of 2' );
is( :2<1.1> * 10 ** 10, 15_000_000_000, 'binary number to power of 10' );
is( :2<1.1> * :2<10> ** :2<10>, 6, 'multiplication and exponentiation' );
# L<S02/Literals/"So we write those as">
# these should be the same values as the previous tests
-#?pugs: todo 'feature'
-#?rakudo: 3 skip "can't parse"
+#?pugs todo 'feature'
+#?rakudo 3 skip "can't parse"
is( :2<1.1*2**10>, 1536, 'Power of two in <> works');
is( :2<1.1*10**10>, 15_000_000_000, 'Power of ten in <> works');
is( eval('2«1.1*:2<10>**:2<10>»'), 6, 'Powers of two in <<>> works');
View
@@ -5,29 +5,29 @@ plan 4;
# L<S04/The C<while> and C<until> statements/while statements
# work as in 5>
-#?rakudo: skip "can't parse"
+#?rakudo skip "can't parse"
{
my $i = 0;
until $i >= 5 { $i++; };
is($i, 5, 'until $i >= 5 {} works');
}
-#?rakudo: skip "can't parse"
+#?rakudo skip "can't parse"
{
my $i = 0;
until 5 <= $i { $i++; };
is($i, 5, 'until 5 <= $i {} works');
}
# with parens
-#?rakudo: skip "can't parse"
+#?rakudo skip "can't parse"
{
my $i = 0;
until ($i >= 5) { $i++; };
is($i, 5, 'until ($i >= 5) {} works');
}
-#?rakudo: skip "can't parse"
+#?rakudo skip "can't parse"
{
my $i = 0;
until (5 <= $i) { $i++; };
View
@@ -4,47 +4,47 @@ use Test;
plan 10;
-#?rakudo: skip "can't parse"
+#?rakudo skip "can't parse"
{
my $i = 0;
while $i < 5 { $i++; };
is($i, 5, 'while $i < 5 {} works');
}
-#?rakudo: skip "can't parse"
+#?rakudo skip "can't parse"
{
my $i = 0;
while 5 > $i { $i++; };
is($i, 5, 'while 5 > $i {} works');
}
# with parens
-#?rakudo: skip "can't parse"
+#?rakudo skip "can't parse"
{
my $i = 0;
while ($i < 5) { $i++; };
is($i, 5, 'while ($i < 5) {} works');
}
-#?rakudo: skip "can't parse"
+#?rakudo skip "can't parse"
{
my $i = 0;
while (5 > $i) { $i++; };
is($i, 5, 'while (5 > $i) {} works');
}
# single value
-#?rakudo: skip "can't parse"
+#?rakudo skip "can't parse"
{
my $j = 0;
while 0 { $j++; };
is($j, 0, 'while 0 {...} works');
}
-#?rakudo: skip "can't parse"
+#?rakudo skip "can't parse"
{
my $k = 0;
while $k { $k++; };
is($k, 0, 'while $var {...} works');
}
-#?rakudo: skip 'No pointy blocks on while loops yet'
+#?rakudo skip 'No pointy blocks on while loops yet'
# L<S04/The C<for> statement/It is also possible to write>
# while ... -> $x {...}
{
@@ -57,7 +57,7 @@ plan 10;
is $str, '54321', 'while ... -> $x {...} worked (1)';
}
-#?rakudo: skip 'No pointy blocks on while loops yet'
+#?rakudo skip 'No pointy blocks on while loops yet'
{
my @array = 0..5;
my $str;
View
@@ -13,7 +13,7 @@ TODO: need some tests for chars with multiple markings.
#L<S05/Modifiers/"The :b">
-#?pugs: 999 skip feature
+#?pugs 999 skip feature
ok(!'ä' ~~ m/a/, 'No basechar: a doesnt match ä');
ok('ä' ~~ m:b/a/, 'Basechar: a matches ä');
ok('a' ~~ m:b/ä/, 'Basechar: ä matches a');
View
@@ -3,9 +3,9 @@ use Test;
plan 9;
-#?pugs: 999 skip
-#?rakudo: 999 skip
-#?kp6: 999 skip
+#?pugs emit skip_rest("unimpl");
+#?rakudo emit skip_rest("unimpl");
+#?kp6 emit skip_rest("unimpl");
#L<S05/Modifiers/"The :ii">
@@ -5,7 +5,7 @@ plan 2;
#L<S05/Modifiers/"If followed by an x, it means repetition.">
-#?pugs emit skip_rest "Not yet implemented"
+#?pugs emit skip_rest("Not yet implemented");
ok('abab' ~~ m:2x/ab/, ':2x (repetition) modifier (1)');
ok('ab' !~~ m:2x/ab/, ':2x (repetition) modifier (1)');
View
@@ -16,15 +16,15 @@ Basic C<kv> tests, see S29.
{
my @a = ();
@a = try { (1,).kv };
- #?pugs: 2 todo 'bug'
+ #?pugs 2 todo 'bug'
is(@a[0],0, "first element is 0");
is(@a[1],1, "second element is 1");
}
# ('a',).kv works correctly
{
@a = try { ('a',).kv };
- #?pugs: 2 todo 'bug'
+ #?pugs 2 todo 'bug'
is(@a[0],0, "first element is 0");
is(@a[1],'a', "second element is 'a'");
}
View
@@ -29,7 +29,7 @@ Basic C<pairs> tests, see S29.
}
}
-#?pugs: todo 'bug'
+#?pugs todo 'bug'
{
my @array = (17, 23, 42);
View
@@ -31,6 +31,7 @@ my (@a,@b,@res);
# to splice(). The intermediate array in the calls
# should be removed later
+#?DOES 2
sub splice_ok (Array @got, Array @ref, Array @exp, Array @exp_ref, Str $comment) {
is "[@got[]]", "[@exp[]]", "$comment - results match";
is @ref, @exp_ref, "$comment - array got modified in-place";
@@ -136,5 +137,5 @@ is +@a, 0, '... empty arrays are not fatal anymore';
# But this should generate a warning, but unfortunately we can't test for
# warnings yet.
-#?pugs: todo 'bug'
+#?pugs todo 'bug'
dies_ok({ 42.splice }, '.splice should not work on scalars');
View
@@ -24,7 +24,7 @@ ok(cat([1..3]) eqv 1..3, 'cat array identity');
# These below work. Just waiting on eqv.
-#?pugs: 2 todo 'These tests depend on eqv'
+#?pugs 2 todo 'These tests depend on eqv'
ok(cat({'a'=>1,'b'=>2,'c'=>3}) eqv ('a'=>1, 'b'=>2, 'c'=>3),
'cat hash identity');
@@ -25,17 +25,17 @@ ok(roundrobin([1..3]) eqv 1..3, 'roundrobin array identity');
# Next 2 work. Just waiting on eqv.
#
-#?pugs: 2 todo 'These tests depend on eqv'
+#?pugs 2 todo 'These tests depend on eqv'
ok(roundrobin({'a'=>1,'b'=>2,'c'=>3}) eqv ('a'=>1,'b'=>2,'c'=>3),
'roundrobin hash identity';
ok(roundrobin((); 1; 2..4; [5..7]; {'a'=>1,'b'=>2})
eqv (1, 2, 5, 'a'=>1, 3, 6, 'b'=>2, 4, 7), 'basic roundrobin');
-#?pugs: todo 'feature'
+#?pugs todo 'feature'
ok(roundrobin(:shortest, 1; 1..2; 1..3) eqv (1), 'roundrobin :shortest');
-#?pugs: todo 'these tests depend on lazy roundrobin'
+#?pugs todo 'these tests depend on lazy roundrobin'
flunk('roundrobin :finite');
=begin lazy_roundrobin
@@ -38,7 +38,7 @@ try {
is( $foo.WHAT, Pair, 'arg to be given as die() arg contains a Pair value' );
die $foo;
};
-#?pugs: todo 'bug'
+#?pugs todo 'bug'
is( $!.WHAT, Pair, 'following try { die() } with Pair arg, $! contains a Pair value');
try {
View
@@ -58,7 +58,7 @@ ok !%hash.exists("42"), "exists on hashes (2)";
my $ref = \( $empty_hash{'z'} );
is( $empty_hash.pairs.sort.join( ',' ), '', "taking a reference to a hash element does not auto-vivify the element");
foo( $empty_hash{'x'} );
- #?pugs: todo 'bug'
+ #?pugs todo 'bug'
is( $empty_hash.pairs.sort.join( ',' ), '', "empty hash stays same when read from (4)" );
my $popul_hash = hash(('a'=>'b'),('c'=>'d'));
@@ -72,7 +72,7 @@ ok !%hash.exists("42"), "exists on hashes (2)";
bar( $popul_hash{'y'} );
is( popul_hash_contents, "a:b,c:d", "populated hash stays same when read from (3)" );
foo( $popul_hash{'x'} );
- #?pugs: todo 'bug'
+ #?pugs todo 'bug'
is( popul_hash_contents, "a:b,c:d", "populated hash stays same when read from (4)" );
}
View
@@ -51,6 +51,7 @@ Basic C<kv> tests, see S29.
# test3 and test4 illustrate a bug
+#?DOES 2
sub test1{
my $pair = boo=>'baz';
my $type = $pair.WHAT;
@@ -61,6 +62,7 @@ sub test1{
}
test1;
+#?DOES 2
sub test2{
my %pair = boo=>'baz';
my $type = %pair.WHAT;
@@ -73,6 +75,7 @@ sub test2{
test2;
my %hash = ('foo' => 'baz');
+#?DOES 2
sub test3 (Hash %h){
for %h.kv -> $key,$value {
is($key, 'foo', "test3: from {+%h}-elem {%h.WHAT} \%h got the right \$key");
@@ -86,6 +89,7 @@ sub test4 (Hash %h){
is(%h.kv[$idx], %hash.kv[$idx], "test4: elem $idx of {%h.kv.elems}-elem {%h.kv.WHAT} \%hash.kv correctly accessed");
}
}
+#?DOES 2 # ???
test4 %hash;
# sanity
@@ -98,36 +102,36 @@ for %hash.kv -> $key,$value {
{
my %hash = (:a(1), :b(2), :c(3));
- #?pugs: todo 'feature'
+ #?pugs todo 'feature'
lives_ok { for %hash.kv -> $key, $value is rw {
$value += 100;
} }, 'aliases returned by %hash.kv should be rw (1)';
- #?pugs: todo 'feature'
+ #?pugs todo 'feature'
is %hash<b>, 102, 'aliases returned by %hash.kv should be rw (2)';
}
{
my @array = (17, 23, 42);
- #?pugs: todo 'feature'
+ #?pugs todo 'feature'
lives_ok { for @array.kv -> $key, $value is rw {
$value += 100;
} }, 'aliases returned by @array.kv should be rw (1)';
- #?pugs: todo 'feature'
+ #?pugs todo 'feature'
is @array[1], 123, 'aliases returned by @array.kv should be rw (2)';
}
{
my $pair = (a => 42);
- #?pugs: todo 'feature'
+ #?pugs todo 'feature'
lives_ok { for $pair.kv -> $key, $value is rw {
$value += 100;
} }, 'aliases returned by $pair.kv should be rw (1)';
- #?pugs: todo 'feature'
+ #?pugs todo 'feature'
is $pair.value, 142, 'aliases returned by $pair.kv should be rw (2)';
}
Oops, something went wrong.

0 comments on commit f60ff61

Please sign in to comment.