Here is the same specification we used to test the CalculatorExample in AllCombinations. Try it using AllPairs.

eg.AllPairs | |

Documents/AllPairs/magnitude/*.html | |

Documents/AllPairs/sign/*.html | |

Documents/AllPairs/function/*.html |

To meet the "all pairs" requirement we need at least n X m cases, where n and m are the sizes of the two largest categories. That means with only two categories all combinations and all pairs are the same. The marvel of the all pairs algorithm is that it squeezes draws from additional categories into these same cases and possibly a few more.

fit.Summary |

**Implementation**

The algorithm is largely JamesBach's from the source cited on the AllPairsExample page. My implementation can be summarized as follows.

- Fill test cases with tests drawn from a list of
*most wanted*pairs. - Fill one case at a time. Never reexamine a case once filled.
- Recirculate used pairs back to the list but as
*less wanted*. - Quit filling cases when all pairs have been used at least once.

- At least one item of a pair is of a category that is not already filled.
- The other item must match the slug in its category or must also be unfilled.

- Item -- A value from within a category.
- Pair -- Two Items drawn from different categories.
- Var -- A category, one per list of files.

Last edited November 9, 2002