Fix feet/inches parsing with apostrophe grouping - #1724
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1724 +/- ##
======================================
Coverage 98% 98%
======================================
Files 515 515
Lines 24077 24090 +13
======================================
+ Hits 23677 23695 +18
+ Misses 400 395 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
✅ Review: No actionable findingsFocused, well-scoped fix for #817 (feet/inches parsing when ✅ Breaking changes
✅ Style and conventions
New quantities or units
Changes to generated code
✅ Code quality & correctness
✅ Performance
✅ Test coverage
✅ Security concerns
|
|
✅ Breaking changes
✅ New quantities or units
✅ Generated code
✅ Code quality and correctness
✅ Test coverage
✅ Performance
✅ Security
|
✅ Review: No actionable findingsReviewed the fix for ✅ Breaking changes
✅ New quantities or units
✅ Changes to generated code
✅ Code quality & correctness
✅ Performance
✅ Test coverage
✅ Security
|
Fixes #817.
Why
Length.TryParseFeetInches()can misinterpret strings where'is both a number group separator and the foot abbreviation. For example, with a culture using apostrophe grouping,1'000' 6"should parse as 1000 feet and 6 inches, but the existing combined regex splits at the first apostrophe.What changed
FeetInches.ToString()/ParseFeetInches()roundtrip test using a culture where apostrophe is the number group separator.Validation
dotnet test UnitsNet.Tests\UnitsNet.Tests.csproj --filter "FullyQualifiedName~FeetInchesTests"