🧪 Add unit tests for KeyPart::to_strs conversion#66
Conversation
Add comprehensive test cases in `crates/recoco-core/src/base/value.rs` covering the conversion of all `KeyPart` variants (Bytes, Str, Bool, Int64, Range, Uuid, Date, Struct) into string arrays using the `to_strs()` method. This ensures that key parts are correctly encoded according to expectation, particularly checking base64 conversion for bytes and string formatting for numbers, bools, UUIDs, and dates. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
recoco-docs | 2a1b8e4 | Commit Preview URL Branch Preview URL |
Mar 13 2026, 03:10 AM |
|
🤖 Hi @bashandbone, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
There was a problem hiding this comment.
Pull request overview
Adds unit test coverage for KeyPart::to_strs, validating string conversion for each KeyPart variant (including nested Struct).
Changes:
- Added a new unit test
test_key_part_to_strscoveringBytes,Str,Bool,Int64,Range,Uuid,Date, and nestedStructconversions. - Asserts expected string outputs including base64 for
Bytesand recursive flattening forStruct.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com>
|
🤖 I'm sorry @bashandbone, but I was unable to process your request. Please see the logs for more details. |
|
👋 Hey @bashandbone, Thanks for your contribution to codeweaver! 🧵You need to agree to the CLA first... 🖊️Before we can accept your contribution, you need to agree to our Contributor License Agreement (CLA). To agree to the CLA, please comment:
Those exact words are important1, so please don't change them. 😉 You can read the full CLA here: Contributor License Agreement ✅ @bashandbone has signed the CLA. You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. Footnotes
|
🎯 What: The testing gap addressed
This PR adds test coverage for the
KeyPart::to_strsmethod incrates/recoco-core/src/base/value.rs, closing a testing gap by formally validating the function that converts key components to string sequences.📊 Coverage: What scenarios are now tested
The new
test_key_part_to_strstest covers string array creation for all possible variants in theKeyPartenum:KeyPart::Bytes(verifies base64 conversion)KeyPart::StrKeyPart::BoolKeyPart::Int64KeyPart::RangeKeyPart::UuidKeyPart::DateKeyPart::Struct(validates recursive conversion of nested keys)✨ Result: The improvement in test coverage
The code now safely and reliably guarantees proper string array representations for
KeyPartevaluation.PR created automatically by Jules for task 18160120789405461786 started by @bashandbone