Repository navigation
test: cover calculator, text transforms, snippets, smart clip and alert rules - #58
Merged
Merged
Conversation
…rt rules Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 changes
Unit tests for user-facing pure logic that had none, found in the codebase audit. There are 5 new test files with about 100 assertions, and no production code changes.
CalculatorTests:evaluatecovers precedence, parentheses,^, implicit multiplication,!,sqrt, unary minus, "20% of 340", "200 + 10%", unit conversions, invalid input and1/0.splitConversion,currencyQuery(parsing only, no network),numberandformat.TextTransformTests:SnippetTests:expand,expandWithCursor,fields(in:), andapply(_:values:), which inserts values literally even with$1or\0in them.SmartClipTests:parseColor(hex, short hex, rgb, HSL, invalid) and the actions offered for colors, tracking codes, links, e-mail and phone numbers.AlertRulesTests:check(_:now:)with an injected time: a rule fires only after its duration, the timer resets when the condition clears, plus 0-minute and disabled rules and a missing battery value.SystemMonitor()withoutstart(), so no hardware or notifications are involved.Notes for review
NSDataDetectorcases inSmartClipTests(phone number, the exact["link", "qr"]list).CalculatorTests("100 °C", "1000 MB").🤖 Generated with Claude Code