format test code