Write function 'assert' and add a bit of tests.