## Tests in Julia

From: andrew cooke <andrew@...>

Date: Fri, 28 Mar 2014 19:20:50 -0300

If you're writing code in Julia you may have been wondering exactly how to do
testing.

For a while now there has been basic support for tests with @test, and this is
now (maybe it has been for a while and I missed it) documented at

But also, in the last week or so, Pkg,test() was merged -
https://github.com/JuliaLang/julia/pull/6191 - which means:

julia> help(Pkg.test)
Base.Pkg.test()

Run the tests for all installed packages ensuring that each
package's test dependencies are installed for the duration of the
test. A package is tested by running its "test/runtests.jl" file
and test dependencies are specified in "test/REQUIRE".

And if you create a new package with Pkg.generate() you get:
(1) an example tests/runtests.jl
(2) all the right configuration in .travis.yml

This is great news.  It means that there's a single, standard way to structure
tests.  And it makes it really easy to get things working on Travis.

Andrew