| 226 | * @param {t.TestCase} tc |
| 227 | */ |
| 228 | export const testRepeatRandomIntersects = tc => { |
| 229 | const clients = 4 |
| 230 | const clockRange = 100 |
| 231 | const ids1 = createRandomIdSet(tc.prng, clients, clockRange) |
| 232 | const ids2 = createRandomIdSet(tc.prng, clients, clockRange) |
| 233 | const intersected = d.intersectSets(ids1, ids2) |
| 234 | for (let client = 0; client < clients; client++) { |
| 235 | for (let clock = 0; clock < clockRange; clock++) { |
| 236 | t.assert((ids1.has(client, clock) && ids2.has(client, clock)) === intersected.has(client, clock)) |
| 237 | } |
| 238 | } |
| 239 | const diffed1 = d.diffIdSet(ids1, ids2) |
| 240 | const altDiffed1 = d.diffIdSet(ids1, intersected) |
| 241 | compareIdSets(diffed1, altDiffed1) |
| 242 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…