tests: improved readability using function test()