Consider (again) the following code:
// GoodFastCheap: Investigating logic testing with an old engineering joke public final class GoodFastCheap { boolean good = false; boolean fast = false; boolean cheap = false; public void makeGood () { good = true; if (fast && cheap) { cheap = false; } } public void makeFast () { fast = true; if (good && cheap) { good = false; } } public void makeCheap () { cheap = true; if (fast && good) { fast = false; } } public void makeBad () { good = false; } public void makeSlow () { fast = false; } public void makeExpensive () { cheap = false; } public boolean isSatisfactory() { if ((good && fast) || (good && cheap) || (fast && cheap)) { return true; } return false; } }Focus first on the predicate in
isSatisfactory()
.
The first step is to identify the possible RACC pairs for each clause
and then assemble the result into a RACC-adequate test set for
all clauses.
We'll start with the logic coverage tool.
isSatisfactory()
?