fixed bug in func_assert, added some tests