By reading it, running it in your mind, and seeing if it runs the way its author expects.
Tests are ideal, but they aren't the only way to specify the correct behavior of code.
By reading it, running it in your mind, and seeing if it runs the way its author expects.
Tests are ideal, but they aren't the only way to specify the correct behavior of code.