Share sequence history construction
This commit is contained in:
@@ -469,21 +469,18 @@ func TestSequenceHistoryReplaysCombinationEvidence(t *testing.T) {
|
||||
t.Fatalf("combine diagnostics = %#v", diagnostics)
|
||||
}
|
||||
|
||||
mode := sequenceHistoryMapped
|
||||
if test.operation == sequenceModeReplace {
|
||||
mode = sequenceHistoryReplace
|
||||
}
|
||||
length := 0
|
||||
if mode == sequenceHistoryReplace {
|
||||
length = len(combined.higherItems)
|
||||
}
|
||||
application := historyApplication{
|
||||
layer: LayerOverlay,
|
||||
value: higherRoot,
|
||||
sequences: []sequenceHistoryContribution{{
|
||||
path: Keys("records"), mode: mode, length: length,
|
||||
items: combined.higherItems, replacements: combined.replacements,
|
||||
}},
|
||||
sequences: []sequenceHistoryContribution{
|
||||
sequenceHistoryContributionForCombination(Keys("records"), test.operation, higher, combined),
|
||||
},
|
||||
}
|
||||
if len(combined.higherItems) != 0 {
|
||||
combined.higherItems[0].outputIndex++
|
||||
}
|
||||
if len(combined.replacements) != 0 {
|
||||
combined.replacements[0].outputIndex++
|
||||
}
|
||||
application.sequencesByPath = indexSequenceHistoryContributions(application.sequences)
|
||||
replayed := document.Clone(lowerRoot)
|
||||
|
||||
Reference in New Issue
Block a user