Skip to content

Commit ad86ccc

Browse files
committed
Replace some eval-dies-ok with throws-like in S32-*/*
1 parent 69f7679 commit ad86ccc

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

S32-list/end.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ is 3.end, 0, 'Scalars look like wrapped in a single-item list';
5858

5959
# test some errors
6060
{
61-
eval-dies-ok ' end() ', '... end() dies without an argument';
61+
throws-like ' end() ', X::TypeCheck::Argument,
62+
'... end() dies without an argument';
6263
}
6364
#vim: ft=perl6

S32-num/pi.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ my $PI = 3.141592e0;
1818

1919
is_approx(EVAL("pi"), $PI, "pi imported by default");
2020

21-
eval-dies-ok("3 + pi()", "pi() is not a sub");
21+
throws-like "3 + pi()", X::Undeclared, "pi() is not a sub";
2222

2323
is_approx(EVAL("3 + pi"), $PI+3, "3+pi, as a bareword");
2424

S32-str/pos.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plan 2;
88

99
my $str = 'moose';
1010
$str ~~ /oo/;
11-
eval-dies-ok('$str.pos', 'Str.pos superseeded by $/.to');
11+
throws-like '$str.pos', X::Method::NotFound, 'Str.pos superseeded by $/.to';
1212

1313
is($/.to, 3, '$/.to works');
1414

S32-trig/e.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Basic tests for trigonometric functions.
1212
my $e = e;
1313

1414
is(e , $e, "e, as a value");
15-
eval-dies-ok('e()', "e(), dies as a sub");
15+
throws-like 'e()', X::Undeclared, "e(), dies as a sub";
1616
is(1 + e, $e+1, "1+e, as a value");
1717
is(e + 1, $e+1, "e+1, as a value");
1818
is(1 + e +0, $e+1, "1 + e +0, as a value");

0 commit comments

Comments
 (0)