How to compare vectors?

Just pass the appropriate tolerances you want for your test. See ?@test.