test: Rewrite testutilites test functions.

The functions change to a generic version so that
the functions are usable with different versions
of the boost test assert macros. The BOOST_REQUIRE
is not needed every time, sometimes BOOST_CHECK
is the better alternative or even BOOST_WARN.