Improving test coverage: test_preprocess.jl

This commit is contained in:
Frondelius
2017-01-03 18:30:17 +02:00
parent f15e6a701f
commit 6a0a7f76ff
+12
View File
@@ -19,3 +19,15 @@ using JuliaFEM.Testing
@test mesh.elements[1] == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
end
@testset "add_nodes! and add_elements!" begin
mesh = Mesh()
dic = Dict(1 => [1.,1.,1.], 2 => [2.,2.,2])
add_nodes!(mesh, dic)
@test mesh.nodes == dic
vec = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
add_elements!(mesh,Dict(1=>(:Tet10,vec),
11=>(:Tet10,vec)))
@test mesh.elements[1] == vec
@test mesh.elements[11] == vec
end