π§ͺ test: add equality check for AsyncButtonTheme empty constant - #7
Conversation
Adds a test to ensure that the `AsyncButtonTheme.empty` constant has correct value-based equality against a new default instance `AsyncButtonTheme()`, preventing regressions.
|
π 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. |
Added `// ignore: use_named_constants` because testing the equality operator requires us to create a new `AsyncButtonTheme()` instance, which the linter warns about since `AsyncButtonTheme.empty` exists.
β¦me-empty-equality-11423725992313475903
The test as written passed via const canonicalization: `empty` is itself `const AsyncButtonTheme()`, so both sides were the same canonical object and `==` short-circuited on `identical` without comparing a field. Assert the fields directly so the invariant is actually pinned. Also fixes the suppression comment β everything after `// ignore:` is parsed as further diagnostic names, so the prose reason was sitting in the rule-name slot. Moved above the directive. Claude-Session: https://claude.ai/code/session_016CksHun59R73nc5XdxJENS
π― What: The testing gap addressed was missing test coverage for
AsyncButtonTheme.emptyconstant equality checking.π Coverage: A new test case covers verifying value-based equality and hash code consistency for the
AsyncButtonTheme.emptyinstance compared to an emptyAsyncButtonTheme()constructor call.β¨ Result: Test coverage for
AsyncButtonThemeequality has been improved and will now catch regressions if the equality operator behavior changes for empty instances.PR created automatically by Jules for task 11423725992313475903 started by @esenmx