Skip to content

Commit

Permalink
Added negaive number test
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Kazmin committed Aug 17, 2018
1 parent 5f3ad7e commit c9c0e61
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ import BracedErrors: ±
@test bracederror(123.456, 0.00012345) == "123.45600(13)"
end

@testset "negative" begin
@test bracederror(-123.456, 0.12345) == "-123.46(13)"
@test bracederror(-123.456, 0.0012345) == "-123.4560(13)"
@test bracederror(-123.456, 340.00012345) == "-123(341)"
end

@testset "dec = 3" begin
@test bracederror(123.456, 0.12345; dec=3) == "123.456(124)"
@test bracederror(123.456, 0.0012345; dec=3) == "123.45600(124)"
Expand Down

0 comments on commit c9c0e61

Please sign in to comment.