Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

reverse order of skip() arguments all over the test suite

  • Loading branch information...
commit 8b5a87e38665023a1877c2b84cf03415ae1eefae 1 parent e15910b
@moritz moritz authored
View
2  S02-builtin_data_types/anon_block.t
@@ -37,7 +37,7 @@ is($anon_block(), 1, '{} <anon block> works');
ok $! ~~ Exception, 'too many parameters';
if $! !~~ Exception {
- skip 2, q{tests don't work if previous test fails};
+ skip q{tests don't work if previous test fails}, 2;
}
else {
my $errmsg = ~$!;
View
2  S02-builtin_data_types/int-uint.t
@@ -8,7 +8,7 @@ plan 7 * @inttypes;
for @inttypes -> $type {
unless eval("my $type \$var; 1") {
- skip 7, "low-level data type $type not supported on this platform";
+ skip "low-level data type $type not supported on this platform", 7;
next;
}
View
6 S04-blocks-and-statements/temp.t
@@ -63,7 +63,7 @@ eval('
is @array[1], 1, "temp() restored our array element";
}
"1 - delete this line when the parsefail eval() is removed";
-') or skip(2, "parsefail: temp \@array[1]");
+') or skip("parsefail: temp \@array[1]", 2);
eval('
{
@@ -75,7 +75,7 @@ eval('
is %hash<b>, 2, "temp() restored our array element";
}
"1 - delete this line when the parsefail eval() is removed";
-') or skip(2, "parsefail: temp \%hash<b>");
+') or skip("parsefail: temp \%hash<b>", 2);
eval('
{
@@ -97,7 +97,7 @@ eval('
is $struct[1]<key>[1], 1, "temp() restored our nested arrayref/hashref element";
}
"1 - delete this line when the parsefail eval() is removed";
-') or skip(2, "parsefail: temp \$struct[1]<key>[1]");
+') or skip("parsefail: temp \$struct[1]<key>[1]", 2);
# Block TEMP{}
# L<S06/Temporization/You can also modify the behaviour of temporized code structures>
View
2  S06-operator-overloading/sub.t
@@ -227,7 +227,7 @@ Testing operator overloading subroutines
if ($try) {
is ~$obj, "hi", "our object was stringified correctly", :todo<feature>;
} else {
- skip 1, "Stringification failed";
+ skip "Stringification failed", 1;
};
#?pugs todo 'feature'
is eval('($obj as OtherClass).x'), 23, "our object was coerced correctly";
View
2  S16-filehandles/chmod.t
@@ -51,7 +51,7 @@ if $*OS eq any <MSWin32 mingw msys cygwin> {
ok $file.IO ~~ :!x, "not executable after 0";
}
else {
- skip 3, ":r :w :x can accidentally work with root permission";
+ skip ":r :w :x can accidentally work with root permission", 3;
}
remove_file($file);
}
View
8 S16-filehandles/filetest.t
@@ -37,14 +37,14 @@ ok $*PROGRAM_NAME.IO ~~ :r, "~~:r returns true on readable files";
ok $*PROGRAM_NAME.IO ~~ :w, "~~:w returns true on writable files";
if $*OS eq any <MSWin32 mingw msys cygwin> {
- skip 2, "win32 doesn't have ~~:x";
+ skip "win32 doesn't have ~~:x", 2;
} else {
if $*EXECUTABLE_NAME.IO ~~ :e {
#?rakudo skip ':x'
ok $*EXECUTABLE_NAME.IO ~~ :x, "~~:x returns true on executable files";
}
else {
- skip 1, "'$*EXECUTABLE_NAME' is not present (interactive mode?)";
+ skip "'$*EXECUTABLE_NAME' is not present (interactive mode?)", 1;
}
#?rakudo skip ':x'
ok 't'.IO ~~ :x, "~~:x returns true on cwd()able directories";
@@ -82,7 +82,7 @@ ok "empty_file".IO ~~ :z, "~~:z returns true for an empty file";
unlink "empty_file";
if $*OS eq any <MSWin32 mingw msys cygwin> {
- skip 9, "~~:M/~~:C/~~:A not working on Win32 yet"
+ skip "~~:M/~~:C/~~:A not working on Win32 yet", 9
}
else {
my $fn = 'test_file_filetest_t';
@@ -96,7 +96,7 @@ else {
unlink $fn;
if "README".IO !~~ :f {
- skip 3, "no file README";
+ skip "no file README", 3;
} else {
#?rakudo 3 skip ':M, :C, :A'
ok ("README".IO ~~ :M) > 0, "~~:M works on existing file";
View
2  S16-filehandles/open.t
@@ -19,7 +19,7 @@ if $*OS eq "browser" {
# deal with non-existent files
{
- skip(1, "open('nonexisting') => undefined is waiting on 'use fatal'");
+ skip("open('nonexisting') => undefined is waiting on 'use fatal'", 1);
if 0 {
ok(!defined(open("file_which_does_not_exist")), 'open() on non-existent file returns undefined');
View
2  S24-testing/1-basic.t
@@ -158,7 +158,7 @@ flunk('This test failed', :todo(1));
## skip
skip('skip this test for now');
-skip(3, 'skip 3 more tests for now');
+skip('skip 3 more tests for now', 3);
skip_rest('skipping the rest');
1;
View
2  S24-testing/5-todo.t
@@ -25,5 +25,5 @@ if ($?COMPILER and $?COMPILER eq 'Pugs') {
#warn ">>> $saved_val\n";
ok !$saved_val, "todo() didn't set \$Test::todo_next_test to True";
} else {
- skip 9, 'no general tests';
+ skip 'no general tests', 9;
}
View
6 S32-array/pairs.t
@@ -19,7 +19,7 @@ Basic C<pairs> tests, see S32.
ok((@pairs = pairs(@array)), "basic pairs on arrays with a function");
is +@pairs, 1, "pairs on arrays returned the correct number of elems";
if +@pairs != 1 {
- skip 2, "skipped tests which depend on a test which failed";
+ skip "skipped tests which depend on a test which failed", 2;
} else {
is @pairs[0].key, 0, "key of pair returned by array.pairs was correct (1)";
is @pairs[0].value, "a", "value of pair returned by array.pairs was correct (1)";
@@ -32,7 +32,7 @@ Basic C<pairs> tests, see S32.
ok((@pairs = pairs(:array(@array))), "basic pairs on arrays with a function with named args");
is +@pairs, 1, "pairs on arrays returned the correct number of elems";
if +@pairs != 1 {
- skip 2, "skipped tests which depend on a test which failed";
+ skip "skipped tests which depend on a test which failed", 2;
} else {
is @pairs[0].key, 0, "key of pair returned by array.pairs was correct (1)";
is @pairs[0].value, "a", "value of pair returned by array.pairs was correct (1)";
@@ -45,7 +45,7 @@ Basic C<pairs> tests, see S32.
ok((@pairs = @array.pairs), "basic pairs on arrays with oo invocation");
is +@pairs, 3, "pairs on arrays returned the correct number of elems";
if +@pairs != 3 {
- skip 6, "skipped tests which depend on a test which failed";
+ skip "skipped tests which depend on a test which failed", 6;
} else {
is @pairs[0].key, 0, "key of pair returned by array.pairs was correct (1)";
is @pairs[1].key, 1, "key of pair returned by array.pairs was correct (2)";
View
4 S32-hash/pairs.t
@@ -19,7 +19,7 @@ Basic C<pairs> tests, see S32::Containers.
ok((@pairs = @pairs.sort), 'Can sort list of pairs');
is +@pairs, 3, "pairs on hashes returned the correct number of elems";
if +@pairs != 3 {
- skip 6, "skipped tests which depend on a test which failed";
+ skip "skipped tests which depend on a test which failed", 6;
} else {
is @pairs[0].key, "a", "value of pair returned by hash.pairs was correct (1)";
is @pairs[1].key, "b", "value of pair returned by hash.pairs was correct (2)";
@@ -37,7 +37,7 @@ Basic C<pairs> tests, see S32::Containers.
ok((@pairs = $pair.pairs), "pairs on a pair");
is +@pairs, 1, "pairs on a pair returned one elem";
if +@pairs != 1 {
- skip 2, "skipped tests which depend on a test which failed";
+ skip "skipped tests which depend on a test which failed", 2;
} else {
is @pairs[0].key, "a", "key of pair returned by pair.pairs";
is @pairs[0].value, 1, "value of pair returned by pair.pairs";
View
2  S32-io/IO-Socket-INET.t
@@ -124,7 +124,7 @@ if $*OS eq any <linux darwin solaris MSWin32> { # please add more valid OS names
is $expected[$i++], ' Callay', '! separator at end of string';
}
else {
- skip 1, "OS '$*OS' shell support not confirmed";
+ skip "OS '$*OS' shell support not confirmed", 1;
}
View
4 S32-io/chdir.t
@@ -17,7 +17,7 @@ if $*OS eq "MSWin32" {
# change to t subfolder and see if cwd is updated
my $subdir = 't';
if $subdir !~~ :d {
- skip 7, "Directory, '$subdir', does not exist";
+ skip "Directory, '$subdir', does not exist", 7;
}
else {
my $cwd = $*CWD;
@@ -38,7 +38,7 @@ else {
my $no_subdir = 'lol does not exist';
if $no_subdir ~~ :d {
- skip 2, "subdir '$no_subdir' does exist, actually.";
+ skip "subdir '$no_subdir' does exist, actually.", 2;
}
else {
lives_ok { chdir("$no_subdir") },
View
4 S32-temporal/time.t
@@ -97,9 +97,7 @@ ok($now > $beg && $now - $beg < 10, 'very basic time test');
ok time + 10, "'time()' may drop its parentheses";
#-- 4 --
-if $*OS eq "browser" {
- skip 1, "Programs running in browsers don't have access to regular IO.";
-} else {
+{
my ($beguser,$begsys);
my ($nowuser,$nowsys);
View
2  integration/99problems-31-to-40.t
@@ -214,7 +214,7 @@ plan 67;
# number of logical inferences as a measure for efficiency. Try to calculate
# phi(10090) as an example.
- skip 1, 'No Benchmark module yet'
+ skip 'No Benchmark module yet', 1
}
{
View
4 integration/99problems-41-to-50.t
@@ -162,7 +162,7 @@ fail fail fail
# fail true fail
# fail fail fail
- skip 1, "Test(s) not yet written: (*) Truth tables for logical expressions (2).";
+ skip "Test(s) not yet written: (*) Truth tables for logical expressions (2).", 1;
}
{
@@ -184,7 +184,7 @@ fail fail fail
# fail fail true true
# fail fail fail true
- skip 1, "Test(s) not yet written: (**) Truth tables for logical expressions (3).";
+ skip "Test(s) not yet written: (**) Truth tables for logical expressions (3).", 1;
}
View
4 integration/99problems-51-to-60.t
@@ -208,7 +208,7 @@ plan 37;
# solutions there are for a given number of nodes? What if the number is even?
# Write an appropriate predicate.
- skip 1, "Test(s) not yet written: (**) Generate-and-test paradigm";
+ skip "Test(s) not yet written: (**) Generate-and-test paradigm", 1;
}
{
@@ -298,7 +298,7 @@ plan 37;
#
# Find out how many height-balanced trees exist for N = 15.
- skip 1, "Test(s) not yet written: (**) Construct height-balanced binary trees with a given number of nodes";
+ skip "Test(s) not yet written: (**) Construct height-balanced binary trees with a given number of nodes", 1;
}
# vim: ft=perl6
View
12 integration/99problems-61-to-70.t
@@ -136,7 +136,7 @@ plan 15;
#
# Test your predicate in an appropriate way.
- skip 1, "Test(s) not yet written: (**) Construct a complete binary tree";
+ skip "Test(s) not yet written: (**) Construct a complete binary tree", 1;
}
sub count($tree) {
@@ -288,7 +288,7 @@ sub count($tree) {
#
# Which layout do you like most?
- skip 1, "Test(s) not yet written: (***) Layout a binary tree (3)";
+ skip "Test(s) not yet written: (***) Layout a binary tree (3)", 1;
}
{
@@ -325,7 +325,7 @@ sub count($tree) {
# For simplicity, suppose the information in the nodes is a single letter
# and there are no spaces in the string.
- skip 1, "Test(s) not yet written: (**) A string representation of binary trees";
+ skip "Test(s) not yet written: (**) A string representation of binary trees", 1;
}
{
@@ -352,7 +352,7 @@ sub count($tree) {
# What happens if the same character appears in more than one node. Try for
# instance pre-in-tree(aba,baa,T).
- skip 1, "Test(s) not yet written: (**) Preorder and inorder sequences of binary trees";
+ skip "Test(s) not yet written: (**) Preorder and inorder sequences of binary trees", 1;
}
{
@@ -381,7 +381,7 @@ sub count($tree) {
#
# T = t(a,[t(f,[t(g,[])]),t(c,[]),t(b,[t(d,[]),t(e,[])])])
- skip 1, "Test(s) not yet written: (**) Dotstring representation of binary trees";
+ skip "Test(s) not yet written: (**) Dotstring representation of binary trees", 1;
}
{
@@ -398,7 +398,7 @@ sub count($tree) {
# construct the Tree when the String is given. Work with atoms (instead of
# strings). Make your predicate work in both directions.
- skip 1, "Test(s) not yet written: (**) Tree construction from a node string";
+ skip "Test(s) not yet written: (**) Tree construction from a node string", 1;
}
# vim: ft=perl6
Please sign in to comment.
Something went wrong with that request. Please try again.