Re:The Fc.exe command does not work when files differ every ...
by pbhjpbhj on Sunday May 08, 2011 @08:21PM
(#2527078)
>Your test suite seems broken (which is why test suites are hard to write in the first place). What if there is a bug when you have two bits changed
I said "a test ... would include ...".
This just seems the first most obvious pattern to check against. You need to be sure the program compares every bit, that just seems the simplest way to be sure that it's looping through every bit of both files and making a proper comparison. Knowing the internals of the program and functions used would give you the data length to check against.
You seem to be saying that because a comprehensive test is impossible no test should have been performed.
In any case wouldn't you see it in the ASCII read out of a watch routine or some such - hey look [made up variable] currentChunk has string terminators at the end which aren't in the chunks of the test file.
You say good coders would miss this sort of bug, I'd think a good coder would realise the function they're using puts a string terminator in.
Without seeing the code I guess we wouldn't know but direct comparison is surely one of the more basic operations to code (although I grant that doing it quickly maybe isn't). Surely the fundamental part is to XOR registers and look for 1s???
I said "a test ... would include ...".
This just seems the first most obvious pattern to check against. You need to be sure the program compares every bit, that just seems the simplest way to be sure that it's looping through every bit of both files and making a proper comparison. Knowing the internals of the program and functions used would give you the data length to check against.
You seem to be saying that because a comprehensive test is impossible no test should have been performed.
In any case wouldn't you see it in the ASCII read out of a watch routine or some such - hey look [made up variable] currentChunk has string terminators at the end which aren't in the chunks of the test file.
You say good coders would miss this sort of bug, I'd think a good coder would realise the function they're using puts a string terminator in.
Without seeing the code I guess we wouldn't know but direct comparison is surely one of the more basic operations to code (although I grant that doing it quickly maybe isn't). Surely the fundamental part is to XOR registers and look for 1s???