Skip to content

Fix =? with missing map keys and a predicate#48

Merged
camsaul merged 3 commits into
mainfrom
fix-approx-equal-map-predicate-37
Jun 16, 2026
Merged

Fix =? with missing map keys and a predicate#48
camsaul merged 3 commits into
mainfrom
fix-approx-equal-map-predicate-37

Conversation

@rileythomp

@rileythomp rileythomp commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Closes #37

When an expected key wasn't in the actual map, we were returning (symbol "nil #_\"key is not present.\"") and then diffing that with the expected value, but this would erroneously return no diff if the expected value was a predicate like some? or any?. The fix in this PR is to only diff with the expected value if the expected key is in the actual map.

@rileythomp rileythomp requested a review from camsaul as a code owner June 16, 2026 21:17
@camsaul camsaul merged commit c44a963 into main Jun 16, 2026
2 checks passed
@camsaul camsaul deleted the fix-approx-equal-map-predicate-37 branch June 16, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(is (=? {:k some?} {})) unexpectedly passes

2 participants