Use `assert` in tests.

Closes #240.