@@ -4,8 +4,8 @@ using FixedPointNumbers
44function test_op {F,T} (fun:: F , :: Type{T} , fx, fy, fxf, fyf, tol)
55 # Make sure that the result is representable
66 (typemin (T) <= fun (fxf, fyf) <= typemax (T)) || return nothing
7- @test abs (fun (fx, fy) - convert (T, fun (fxf, fyf))) <= tol
8- @test abs (convert (Float64, fun (fx, fy)) - fun (fxf, fyf)) <= tol
7+ @assert abs (fun (fx, fy) - convert (T, fun (fxf, fyf))) <= tol
8+ @assert abs (convert (Float64, fun (fx, fy)) - fun (fxf, fyf)) <= tol
99end
1010
1111function test_fixed {T} (:: Type{T} , f)
@@ -36,16 +36,16 @@ function test_fixed{T}(::Type{T}, f)
3636 fy = convert (T,y)
3737 fyf = convert (Float64, fy)
3838
39- @test fx== fy || x!= y
40- @test fx< fy || x>= y
41- @test fx<= fy || x> y
39+ @assert fx== fy || x!= y
40+ @assert fx< fy || x>= y
41+ @assert fx<= fy || x> y
4242
4343 test_op (+ , T, fx, fy, fxf, fyf, tol)
4444 test_op (- , T, fx, fy, fxf, fyf, tol)
4545 test_op (* , T, fx, fy, fxf, fyf, tol)
4646 fy != 0 && test_op (/ , T, fx, fy, fxf, fyf, tol)
4747
48- @test isequal (fx,fy) == isequal (hash (fx),hash (fy))
48+ @assert isequal (fx,fy) == isequal (hash (fx),hash (fy))
4949 end
5050 end
5151end
0 commit comments