News for hackers. Stuff that matters.
Re:Google broke a conditional statement that verifies passwo... by thaumasiotes on Friday July 23, 2021 @04:22PM (#27935167)
You are not attempting to have branch coverage; you are attempting to cover the space of possible inputs.
Re:Google broke a conditional statement that verifies passwo... by snovv_crash on Saturday July 24, 2021 @05:08PM (#27944500)
You're trying to check that all of your logic is correct. That's the point of doing tests. If your test doesn't check for certain input combinations, then you haven't tested your logic completely.

The point of branch coverage is to show when you missed input combinations for your logic. Artificially running all of the branches and then throwing away results just gives you a false sense of security about how much of your logic you covered.

I mean, technically, using bitwise instead of short-circuiting logic doesn't have branches at an assembly code level. But this is pedantry because we're actually trying to check the logic is correct, not that our compiler can correctly translate && into the same Boolean result as &.