testkit: improve error message for failed  assertions