Separate function to print test results