Adding a simple function to validate results from test cases.