| 127 | * @param {t.TestCase} tc |
| 128 | */ |
| 129 | export const testRepeatRandomDiffing2 = tc => { |
| 130 | const clients = 4 |
| 131 | const clockRange = 100 |
| 132 | const attrs = [1, 2, 3] |
| 133 | const idmap1 = createRandomIdMap(tc.prng, clients, clockRange, attrs) |
| 134 | const idmap2 = createRandomIdMap(tc.prng, clients, clockRange, attrs) |
| 135 | const idsExclude = createRandomIdSet(tc.prng, clients, clockRange) |
| 136 | const merged = idmap.mergeIdMaps([idmap1, idmap2]) |
| 137 | const mergedExcluded = idmap.diffIdMap(merged, idsExclude) |
| 138 | const e1 = idmap.diffIdMap(idmap1, idsExclude) |
| 139 | const e2 = idmap.diffIdMap(idmap2, idsExclude) |
| 140 | const excludedMerged = idmap.mergeIdMaps([e1, e2]) |
| 141 | compareIdMaps(mergedExcluded, excludedMerged) |
| 142 | const copy = YY.decodeIdMap(YY.encodeIdMap(mergedExcluded)) |
| 143 | compareIdMaps(mergedExcluded, copy) |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * @param {t.TestCase} tc |
nothing calls this directly
no test coverage detected
searching dependent graphs…