Skip to content

Commit

Permalink
Test (-Inf).Int throwage
Browse files Browse the repository at this point in the history
japhb++
  • Loading branch information
zoffixznet committed Oct 27, 2016
1 parent 3cc848d commit 9ce67f1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions S02-types/infinity.t
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ ok truncate(Inf) ~~ Inf, 'truncate(Inf) ~~ Inf';

# RT #124453
{
throws-like { Inf.Int }, Exception, :message(/'Cannot coerce Inf to an Int'/),
throws-like { Inf.Int }, Exception, :message(/'Cannot coerce Inf to an Int'/),
'attempting to convert Inf to Int throws';

throws-like { -Inf.Int }, Exception, :message(/'Cannot coerce -Inf to an Int'/),
throws-like { (-Inf).Int }, Exception, :message(/'Cannot coerce -Inf to an Int'/),
'attempting to convert Inf to Int throws';

throws-like { ∞.Int }, Exception, :message(/'Cannot coerce Inf to an Int'/),
throws-like { .Int }, Exception, :message(/'Cannot coerce Inf to an Int'/),
'attempting to convert ∞ to Int throws';

throws-like { -∞.Int }, Exception, :message(/'Cannot coerce Inf to an Int'/),
throws-like { (-∞).Int }, Exception, :message(/'Cannot coerce -Inf to an Int'/),
'attempting to convert -∞ to Int throws';

throws-like { NaN.Int }, Exception, :message(/'Cannot coerce NaN to an Int'/),
throws-like { NaN.Int }, Exception, :message(/'Cannot coerce NaN to an Int'/),
'attempting to convert NaN to Int throws';
}

Expand Down

0 comments on commit 9ce67f1

Please sign in to comment.