Skip to content

Commit

Permalink
bug
Browse files Browse the repository at this point in the history
  • Loading branch information
msbarry committed Jun 11, 2024
1 parent 6ef37ba commit d319222
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -685,5 +685,10 @@ record PartialInput(Set<String> source, Set<String> layer, Map<String, Object> t
public static PartialInput ofSource(String source) {
return new PartialInput(Set.of(source), Set.of(), Map.of(), Set.of());
}

@Override
public Map<String, Object> tags() {
return tags == null ? Map.of() : tags;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ void testPartialEvaluateMatchField() {
void testPartialEvaluateMatchAny() {
var expr = matchAny("field", "value1", "other%");
assertEquals(expr, expr.partialEvaluate(new PartialInput(Set.of(), Set.of(), Map.of("other", "value"), Set.of())));
assertEquals(expr, expr.partialEvaluate(new PartialInput(Set.of(), Set.of(), null, Set.of())));
assertEquals(TRUE, expr.partialEvaluate(new PartialInput(Set.of(), Set.of(), Map.of("field", "value1"), Set.of())));
assertEquals(TRUE, expr.partialEvaluate(new PartialInput(Set.of(), Set.of(), Map.of("field", "other"), Set.of())));
assertEquals(TRUE,
Expand Down

0 comments on commit d319222

Please sign in to comment.