Add error computation to test cases