File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ julia = "1"
88
99[extras ]
1010Test = " 8dfed614-e22c-5e08-85e1-65c5234f0b40"
11+ SaferIntegers = " 88634af6-177f-5301-88b8-7819386cfa38"
1112
1213[targets ]
13- test = [" Test" ]
14+ test = [" Test" , " SaferIntegers " ]
Original file line number Diff line number Diff line change 288288 @test @unchecked (1 + 4 + 5 + typemax (Int)) == 10 + typemax (Int)
289289 @test @checked (1.0 + 4 + 5 + typemax (Int)) == 9.223372036854776e18
290290end
291+
292+ using SaferIntegers
293+
294+ @testset " Ensure SaferIntegers are still safer" begin
295+ @test_throws OverflowError typemax (SafeInt) + 1
296+ @test_throws OverflowError @unchecked typemax (SafeInt) + 1
297+ (@__MODULE__ ). eval (:(
298+ module UncheckedDefaultSaferIntStillChecksModule
299+ using OverflowContexts, SaferIntegers, Test
300+ @default_unchecked
301+ @test_throws OverflowError typemax (SafeInt) + 1
302+ end ))
303+ end
You can’t perform that action at this time.
0 commit comments