Pergunta de entrevista da empresa Google

the interviewer ask me to write the code to implement the sqrt function, to be more specific double sqrt(doulbe x). There're quite a few answers if you google it, but the most difficult part is to explain how you can test the code you just write. I didn't do quite well as software testing is not my tranditional area of expertise, what I can think out of my mind is just to check some boundary conditions which obviously is not what the interviewer expected