You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(test): Add comprehensive edge case tests for IncrByFloat command (#3477)
This commit adds extensive test coverage for the IncrByFloat Redis command,
covering various edge cases and scenarios that were not previously tested.
Test cases added:
- Negative increment values
- Zero increment (should return current value)
- High precision floating point operations
- Non-existent key behavior (should start from 0)
- Integer values stored as strings
- Scientific notation (both positive and negative)
- Error handling for non-numeric values
- Very large numbers (near float64 limits)
- Very small numbers (near zero precision)
These tests ensure robust behavior of the IncrByFloat command across
different numeric formats and edge conditions, improving the overall
reliability and test coverage of the go-redis library.
The tests use Gomega's BeNumerically matcher for floating point
comparisons to handle precision issues appropriately.
0 commit comments