@@ -4,8 +4,8 @@ using FixedPointNumbers
4
4
function test_op {F,T} (fun:: F , :: Type{T} , fx, fy, fxf, fyf, tol)
5
5
# Make sure that the result is representable
6
6
(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
9
9
end
10
10
11
11
function test_fixed {T} (:: Type{T} , f)
@@ -36,16 +36,16 @@ function test_fixed{T}(::Type{T}, f)
36
36
fy = convert (T,y)
37
37
fyf = convert (Float64, fy)
38
38
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
42
42
43
43
test_op (+ , T, fx, fy, fxf, fyf, tol)
44
44
test_op (- , T, fx, fy, fxf, fyf, tol)
45
45
test_op (* , T, fx, fy, fxf, fyf, tol)
46
46
fy != 0 && test_op (/ , T, fx, fy, fxf, fyf, tol)
47
47
48
- @test isequal (fx,fy) == isequal (hash (fx),hash (fy))
48
+ @assert isequal (fx,fy) == isequal (hash (fx),hash (fy))
49
49
end
50
50
end
51
51
end
0 commit comments