Adding tests for error function.