Fixing tests for libcheck 0.13.0
Since libcheck 0.13 it's mandatory to wrap the unit-test code in a block. This updates the tests to comply with this.
This fix is backwards compatible with libcheck 0.12.