Skip to content

Commit

Permalink
fixed test of rouding intest/builtins_auto/int.act
Browse files Browse the repository at this point in the history
  • Loading branch information
sydow committed Nov 11, 2023
1 parent 62a5b8f commit c749294
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/builtins_auto/int.act
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def test_u32_divzero():
u32(3) // u32(0)
except ZeroDivisionError:
return
raise testing.NotRaisesError("expected ZeroDivisionError for u32")

raise testing.NotRaisesError("expected ZeroDivisionError for u32")

def test_u64_divzero():
try:
Expand Down Expand Up @@ -147,9 +148,9 @@ actor main(env):
raise ValueError("10**500/10**500 != 1")
if (round(123456789, 10)) != 1.23456789e8:
raise ValueError("round(123456789, 10) != 1.23456789e8")
if round(123456789, -10) != 1234567890000000000:
if round(123456789, -4) != 123460000:
raise ValueError("round(123456789, -10) != 1234567890000000000")
if round(-123456789, -10) != -1234567890000000000:
if round(-123456789, -4) != -123460000:
raise ValueError("round(-123456789, -10) != -1234567890000000000")
if int('123') != 123:
raise ValueError("int('123') != 123")
Expand Down

0 comments on commit c749294

Please sign in to comment.