diff options
Diffstat (limited to 'cpan/Math-BigInt/t/trap.t')
-rw-r--r-- | cpan/Math-BigInt/t/trap.t | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cpan/Math-BigInt/t/trap.t b/cpan/Math-BigInt/t/trap.t index 5fdf4c24b2..a02a89c9e9 100644 --- a/cpan/Math-BigInt/t/trap.t +++ b/cpan/Math-BigInt/t/trap.t @@ -26,7 +26,7 @@ foreach my $class ($mbi, $mbf) { # also test that new() still works normally eval ("\$x = \$class->new('42'); \$x->bnan();"); - like($@, qr/^Tried to set/, 'died'); + like($@, qr/^Tried to create/, 'died'); is($x, 42, '$x after new() never modified'); # can reset? @@ -38,31 +38,31 @@ foreach my $class ($mbi, $mbf) { is($cfg->{trap_inf}, 1, 'trap_inf enabled'); eval ("\$x = \$class->new('4711'); \$x->binf();"); - like($@, qr/^Tried to set/, 'died'); + like($@, qr/^Tried to create/, 'died'); is($x, 4711, '$x after new() never modified'); eval ("\$x = \$class->new('inf');"); - like($@, qr/^Tried to set/, 'died'); + like($@, qr/^Tried to create/, 'died'); is($x, 4711, '$x after new() never modified'); eval ("\$x = \$class->new('-inf');"); - like($@, qr/^Tried to set/, 'died'); + like($@, qr/^Tried to create/, 'died'); is($x, 4711, '$x after new() never modified'); # +$x/0 => +inf eval ("\$x = \$class->new('4711'); \$x->bdiv(0);"); - like($@, qr/^Tried to set/, 'died'); + like($@, qr/^Tried to create/, 'died'); is($x, 4711, '$x after new() never modified'); # -$x/0 => -inf eval ("\$x = \$class->new('-0815'); \$x->bdiv(0);"); - like($@, qr/^Tried to set/, 'died'); + like($@, qr/^Tried to create/, 'died'); is($x, '-815', '$x after new not modified'); $cfg = $class->config( trap_nan => 1 ); # 0/0 => NaN eval ("\$x = \$class->new('0'); \$x->bdiv(0);"); - like($@, qr/^Tried to set/, 'died'); + like($@, qr/^Tried to create/, 'died'); is($x, '0', '$x after new not modified'); } |