@@ -398,15 +398,20 @@ end
398398end
399399
400400@testset " multiargument methods" begin
401- @test @checked (1 + 4 + 5 ) == 10
402- @test_throws OverflowError @checked (typemax (Int) + 1 + 4 + 5 )
403- @test_throws OverflowError @checked (1 + 4 + 5 + typemax (Int))
404- @test @checked (1.0 + 4 + 5 + typemax (Int)) == 9.223372036854776e18
401+ @test @checked (+ ( 1 , 4 , 5 ) ) == 10
402+ @test_throws OverflowError @checked (+ ( typemax (Int), 1 , 4 , 5 ) )
403+ @test_throws OverflowError @checked (+ ( 1 , 4 , 5 , typemax (Int) ))
404+ @test @checked (+ ( 1.0 , 4 , 5 , typemax (Int) )) == 9.223372036854776e18
405405
406- @test @unchecked (1 + 4 + 5 ) == 10
407- @test @unchecked (typemax (Int) + 1 + 4 + 5 ) == 10 + typemax (Int)
408- @test @unchecked (1 + 4 + 5 + typemax (Int)) == 10 + typemax (Int)
409- @test @checked (1.0 + 4 + 5 + typemax (Int)) == 9.223372036854776e18
406+ @test @unchecked (+ (1 , 4 , 5 )) == 10
407+ @test @unchecked (+ (typemax (Int), 1 , 4 , 5 )) == 10 + typemax (Int)
408+ @test @unchecked (+ (1 , 4 , 5 , typemax (Int))) == 10 + typemax (Int)
409+ @test @unchecked (+ (1.0 , 4 , 5 , typemax (Int))) == 9.223372036854776e18
410+
411+ @test @saturating (+ (1 , 4 , 5 )) == 10
412+ @test @saturating (+ (typemax (Int), 1 , 4 , 5 )) == typemax (Int)
413+ @test @saturating (+ (1 , 4 , 5 , typemax (Int))) == typemax (Int)
414+ @test @saturating (+ (1.0 , 4 , 5 , typemax (Int))) == 9.223372036854776e18
410415end
411416
412417using SaferIntegers
0 commit comments