Re:Write A Function To Determine If A Number Is A Power Of 2
by tlrobinson on Monday October 18, 2010 @12:38PM
(#1804142)
Oh yeah, I've been asked to describe how I would verify my code was correct including edge cases, but I've never seen people actually write test code.
They want to know that you know what sorts of inputs to start testing on (empty input, if that's valid, each obvious corner case (can you find all the corner cases quickly? This is a good skill to have), etc.) and that you can do this mentally a little before you compile and run the tests.