better panic tests

I fixed the divide by zero test and the square root of negative number test, so that the defer checks for the correct error message from the panic rather than any error message.