Skip to content

Commit

Permalink
Test case for bug in base10?() (ericmj#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
razuf authored May 20, 2020
1 parent 28a939c commit dcfbbd3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/decimal/context_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@ defmodule Decimal.ContextTest do
assert :inexact in Context.get().flags
end)

Context.with(%Context{precision: 111}, fn ->
assert [] = Context.get().flags

Decimal.div(
~d"10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
~d"17"
)

assert [:rounded] = Context.get().flags
end)

Context.with(%Context{precision: 2}, fn ->
assert [] = Context.get().flags

Expand Down

0 comments on commit dcfbbd3

Please sign in to comment.