Repository navigation
test(core): pin json_field_equals with exact values - #1780
Merged
Merged
Conversation
--where key=value matches a top-level string, number, bool or null by its printed value; arrays, objects, a missing key, content that is not a JSON object and a non-json content type never match.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two unit tests for
json_field_equalsinrecall_exec.rs(recall --where key=value): a top-level string, number, bool and null match by their printed value (and near misses do not), and arrays, objects, a missing key, a non-object JSON value, invalid JSON and a non-jsoncontent type never match. Test code only.Why
The v0.24.0 mutation gate reported a missed mutant here late (
==to!=), and #1766 tracks it (item "Reported late by the gate, no test yet").Testing
cargo mutants -p uteke-core -f recall_exec.rs -F json_field_equals: 11 mutants, 11 caught (the same function had a missed mutant before).cargo test -p uteke-core --lib where_passes;cargo fmtis clean.Part of #1766 (does not close it: the rest of its list is still open).