Fixed returns in tests

Fixed some of the return statements and "error" vs "int" comparisons in the tests.