diff --git a/test/test_fields.jl b/test/test_fields.jl index af07593..94ca3a8 100644 --- a/test/test_fields.jl +++ b/test/test_fields.jl @@ -44,6 +44,7 @@ end @test interpolate(a, 0.0) == (1, 2) update!(a, (2,3)) @test a == (2,3) + @test (2,3) == a # vector field b = DVTI(([1,2], [2,3])) diff --git a/test/test_problems.jl b/test/test_problems.jl index bc2ed2b..a8be814 100644 --- a/test/test_problems.jl +++ b/test/test_problems.jl @@ -26,9 +26,17 @@ function P2() return P2(:incremental) end +type P3 <: FieldProblem +end + get_unknown_field_name(p::P1) = "P1" get_formulation_type(p::Problem{P2}) = p.properties.formulation +@testset "test get_unknown_field_name" begin + p = Problem(P3, "P3", 1) + @test get_unknown_field_name(p) == "N/A" +end + @testset "test creating new problems" begin p1 = Problem(P1, "P1", 1) p2 = Problem(P2, "P2", 2, "p") @@ -241,3 +249,12 @@ end @test isapprox(C, C_expected) @test isapprox(g, g_expected) end + +@testset "test deprecated assembly procedure" begin + problem = Problem(P3, "P3", 1) + elements = [Element(Seg2, [1, 2])] + add_elements!(problem, elements) + assemble!(problem.assembly, problem, first(elements), 0.0) + assemble!(problem.assembly, problem, problem.elements, 0.0) + assemble_elements!(problem, problem.assembly, elements, 0.0) +end