Fix tests

* Fix deprecation warnings from tests
* Refactor tests so that ´@testset` is usually called in master file
  `runtests.jl`, not inside test file. Later on we can convert tests
  to examples.
* Syntax of tests now follow more closely syntax used currently in
  JuliaFEM. We have had earlier studies with different kind of syntaxes,
  now we have kind of explicit way to do things.
This commit is contained in:
Jukka Aho
2018-09-06 12:08:16 +03:00
parent 52be9e546b
commit ca7e2904cf
53 changed files with 2285 additions and 2581 deletions
+2 -4
View File
@@ -1,8 +1,7 @@
# This file is a part of JuliaFEM.
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
using JuliaFEM
using JuliaFEM.Testing
using JuliaFEM, Test
abstract type PlaneStressElasticityProblem <: AbstractProblem end
@@ -61,9 +60,8 @@ function test_residual_form()
free_dofs = [3, 4, 5, 6]
solve!(problem, free_dofs, 0.0) # launch a newton solver for single element
disp = element("displacement", [1.0, 1.0], 0.0)
info("displacement at tip: $disp")
@info("displacement at tip: $disp")
# verified using Code Aster.
@test isapprox(disp[2], -8.77303119819776E+00)
end