Fixed crash, simplified code in testassert.cpp