Who reviews the reviewers?
You have some options for this:
- Add a comment (if you have the reputation)
- Downvote (if you have the reputation), and if you downvote it is recommended that you also add a comment.
You did the right choice by adding a comment.
Given the number of questions and answers on this site, I don't expect everyone to actually test all the code in the questions and answers. At least for me, usually I just read the code and the text in the answer and vote from that. Probably users read the text and think "Yes, this sounds correct".
Now, I don't want to "defend" the answerer here but it is possible that the code was partially tested, but not as much as desired in this case.
Add a comment. Downvote. Also, you can visit our chatroom and express your opinion about the answer. There are many questions that receives much more attention just when someone posts it in the chat. That's all you can do.