-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnitParser.TryParse doesn't try with FallbackCulture #1443
Comments
No that sounds like a mistake, please do 🙇 |
By the way, I see that the |
I thought we had some tests on this, but let's add some as part of the fix. |
…ture - UnitParser: extracting a FindMatchingUnits function (used by both Parse and TryParse for a given abbreviation and culture) - UnitAbbreviationsCache: just a cosmetic change (flipping the order of the items in the tuple) - UnitParserTests: added the missing tests for the FallbackCulture
Fixes #1443 - [x] `UnitParser`: extracting a `FindMatchingUnits` function (used by both `Parse` and `TryParse` for a given abbreviation and culture) - [x] `UnitAbbreviationsCache`: just a cosmetic change (flipping the order of the items in the tuple) - [x] `UnitParserTests`: added the missing tests for the `FallbackCulture` - [x] `UnitTestBaseClassGenerator`: improving the code-coverage of the `ParseUnit` and `TryParseUnit` tests (parsing without specifying a culture, which should always work with abbreviations for the `FallbackCulture`) - Add some extra tests regarding CurrentCulture and explicit culture for parsing --------- Co-authored-by: Andreas Gullberg Larsen <[email protected]>
Closing this as fixed in v6, reopen if you intended to also fix for master (v5). |
I just noticed that the behavior of
UnitParser.Parse(..)
is different from that ofUnitParser.TryParse(..)
with regards to theFallbackCulture
.Was that intentional? Should I do something about it?
The text was updated successfully, but these errors were encountered: