in reply to Re: How does one avoid tautologies in testing?
in thread How does one avoid tautologies in testing?
Isn't the act of testing per definition a redundancy and therefore tautologies not avoidable?
No, testing in the sense that it's used in programming is checking actual results against expected results.
A tautology is a logic expression or formula that's always true - not only when your program is working, but also when it's broken.
For example the addition operator + is rather primitive, and you're hard-pressed to test it in terms of even more primitive operations. If you accidentally test + in terms of -, and for the CPU that's the same operation, your test will always pass, even if the arithmetic unit in your CPU is broken - as long as it's still deterministic.
However if you test it in terms of examples, a broken + can be detected - no tautology here.
For example: If I try if a knife cuts a piece of paper before I buy it in a shop, I'm testing this unknown knife. Who knows if it's sharp otherwise?
But if I try my knife just after I sharpened it, I'm assuring that it's sharp, even if I already should know it's redundant to do so!
Not all tests are regression tests.
|
|---|