Refactoring of test files

* Make each file self contained, such that they can be run separately.
``run_tests.jl`` still works.
* Replace ``@assert`` with ``@test``.