First steps toward functional testing, part 2

Author(s): Jukka Aho jukka.aho@kapsi.fi

Abstract: This is demonstration document describing how to combine functional testing, continous integration and documentation in to the single document.

These multi-purposal documents test several things at once. While they test that documentation is up-to-date, calculation results are what is expected and code base is working, they also serve as a tutorials and examples how to use JuliaFEM.

Let's start. Hello world. Local time is here


In [ ]:
Libc.strftime(time())

Basic testing


In [ ]:
f(x) = 2*x
f(1)

In [ ]:
@assert f(1) == 2
\begin{equation} A_{ij}=\int_{0}^{L}\phi_{i}\phi_{j}\,\mathrm{d}x \end{equation}

Use FactCheck to validate your results

We actually use FactCheck to test our results


In [ ]:
using FactCheck

In [ ]:
facts("test that f(1) equals to 2") do
    @fact f(1) => 2
end

In [ ]: