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
Daily Test Coverage Improver: Comprehensive TextConversions test coverage
This commit significantly improves test coverage for the TextConversions module
in FSharp.Data.Runtime.Utilities by adding 14 new comprehensive test methods.
## Problems Found
- TextConversions had minimal test coverage with only 4 basic tests
- Key conversion methods like AsInteger, AsInteger64, AsTimeSpan, AsGuid were untested
- Missing values handling and currency adorner removal were not validated
- Edge cases like scientific notation, special float values, and malformed input were uncovered
- No validation of whitespace handling and format variations
## Actions Taken
Added 14 new test methods covering:
**Enhanced Boolean Conversions:**
- Whitespace handling and trimming
- Additional valid value formats (YES/NO, TRUE/FALSE variations)
**New Integer & Integer64 Conversions:**
- Positive and negative number parsing
- Currency adorner removal ($, €, ¥, £, ₹)
- Non-currency adorner handling (%, ‰, ‱)
- Max/min value boundary testing
- Invalid input validation
**Enhanced Decimal Conversions:**
- Various decimal formats (.5, 1000.00)
- Percentage notation handling
- Invalid format detection
**New Float Conversions with Missing Values:**
- Scientific notation (1.23e10, 1.23e-5, 1.23E+3)
- Special values (Infinity, -Infinity, NaN)
- Missing values array handling (NaN, NA, N/A, #N/A, :, -, TBA, TBD)
- UseNoneForMissingValues flag behavior validation
**Enhanced DateTime Conversions:**
- Additional date format support
- Microsoft JSON date format (/Date(timestamp)/)
- Malformed date validation
**Enhanced DateTimeOffset Conversions:**
- Various timezone offset formats
- Invalid input handling
**New TimeSpan Conversions:**
- Standard time formats (HH:MM:SS)
- Days.Hours:Minutes:Seconds format
- Whitespace handling
- Invalid format detection
**New Guid Conversions:**
- Multiple GUID format support ({}, (), standard, no-dashes)
- Case insensitivity validation
- Whitespace trimming
- Malformed GUID detection
**New String Conversions:**
- Option type behavior validation
- Null/empty/whitespace handling
**Edge Cases & Validation:**
- Comprehensive currency symbol removal testing
- Default missing values array validation
- Whitespace and special character handling
- Empty string and null input validation
## Test Results
- **Total new tests added**: 14 test methods
- **Total test count**: 2,268 → 2,282 tests (+14)
- **All tests passing**: ✅ 2,282/2,282
- **Build status**: ✅ No compilation errors
- **Code formatting**: ✅ Fantomas validation passed
This improvement significantly strengthens the reliability of text conversion
operations throughout the FSharp.Data library, providing comprehensive validation
of data parsing and type conversion functionality.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments