Skip to content

Better matching in AList AnyOrder #15

@bertvanbrakel

Description

@bertvanbrakel

on mismatch in AList AnyOrder, cycle through all combinations which could match (so every matcher is matched against each object once), store result, then figure out which permutations ensure all matchers are matched once.

Currently as soon as a matcher matches, it's taken out of the list of possible matchers, So one matcher could be too eager

e.g. make it like so

foreach(item in actual){
result.Current = item
foreach(matcher in matchers)
if( matcher.Match(item))
results.Matched(matcher)
}

result.CalculateAllMatchersMatchedOnce()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions