Skip to content

Commit f42c843

Browse files
committed
Add tests
1 parent 83f5f62 commit f42c843

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/runtests.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,4 +217,21 @@ diff = x - [0.775725, -0.571202, -0.290989, -0.157001, -0.106981, 0.622652,
217217

218218
end
219219

220+
@testset "Precision" begin
221+
222+
a = poisson(100)
223+
b = rand(size(a,1))
224+
225+
# Iterate through all types
226+
for (T,V) in ((Float64, Float64), (Float32,Float32),
227+
(Float64,Float32), (Float32,Float64))
228+
a = T.(a)
229+
ml = smoothed_aggregation(a)
230+
b = V.(b)
231+
c = cg(a, b, maxiter = 10)
232+
@test eltype(solve(ml, b)) == eltype(c)
233+
end
234+
220235
end
236+
237+
end

0 commit comments

Comments
 (0)