formatted code
added testcase for non-trivial safe function call in assert