[PATCH] D23156: [ADT] Stop trying to test every combination of values in a triple in every permutation.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 4 14:12:39 PDT 2016


dblaikie added a subscriber: dblaikie.
dblaikie added a comment.

Do you need to use permutations?

So the original version tried every value in every slot against every other value in every slot.
Given, say, 4 slots each with M, N, O, and P possible values, that gives us M * N * O * P test cases.

- but we can reasonably identify that the parsing of the value in a given slot is independent of the values in the other slots, so this now tests every value in every slot regardless of the values in other slots?
  - that gets us down to (M + N + O + P) * 4 tests (assuming 4 slots for simplicity)

- would it be reasonable to assume that the parsing of a value is independent of which slot it is in? So we shouldn't then test that every value can appear in every slot/ordering?
  - that would get us down to M + N + O + P test cases

Essentially we want to test that the different entities can appear in any order (one test for each ordering, or 4!) then that each value for each entity can roundtrip (M + N + O + P), I think?


https://reviews.llvm.org/D23156





More information about the llvm-commits mailing list