Retain matched resolution evidence in history
This commit is contained in:
@@ -51,6 +51,14 @@ func TestResolutionCorrespondenceDynamicCompoundIdentities(t *testing.T) {
|
||||
before := parseCompositionDocument(t, "before", "groups: {alpha: {items: [{id: 1, kind: x}, {id: '1', kind: x}]}, empty: {items: []}}")
|
||||
after := parseCompositionDocument(t, "after", "groups: {alpha: {items: [{id: '1', kind: x}, {id: 1.0, kind: x}]}, empty: {items: []}}")
|
||||
matching := buildResolutionCorrespondence(before, after, policy)
|
||||
retained := matching.clone()
|
||||
changed := matching.collections["/groups/alpha/items"]
|
||||
changed.finalToEntry[0] = 0
|
||||
matching.collections["/groups/alpha/items"] = changed
|
||||
if entry, ok := retained.entryPath(Keys("groups", "alpha", "items").Index(0)); !ok || entry.String() != "/groups/alpha/items/1" {
|
||||
t.Fatalf("retained correspondence shares mutable indexes: %s, %t", entry.String(), ok)
|
||||
}
|
||||
matching = retained
|
||||
if empty := matching.collections["/groups/empty/items"]; !empty.eligible || empty.structural {
|
||||
t.Fatalf("empty = %#v", empty)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user