-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Fix a failing BigInteger outer loop test #1592
Conversation
Can you verify this passes on Linux/OSX as well? It may not, due to #846, in which case we should change the attribute to [ActiveIssue(846, PlatformID.AnyUnix)]. Of course, if it does pass, great. cc: @ellismg |
I have no available Linux/OSX for now. ❗ With these fixes I'm getting test failure locally
I think it's a bug. So before merging this, test it locally please with repro steps in #1491 |
@Maxwe11, I'm not sure I understand your above comment. Does it mean there is a product bug in addition to the test bug or that this fix doesn't fix a test? |
Seems to me yes. I've checked same input with full .NET and it throws FormatException as expected. |
@Maxwe11, can you share the input you used that's failing on .NET 4.5/6 bug succeeding on .NET Core? |
@stephentoub
this line doesn't throws but tests written so |
I just tested this on both .NET 4.6 and with .NET Core:
and in both cases it throws a FormatException for me. You're seeing otherwise? |
@stephentoub test it with repro steps from #1491. |
Ah, ok, so this comment "Seems to me yes. I've checked same input with full .NET and it throws FormatException as expected" is no longer true, right? You're not currently aware of any inputs that have different exceptional behavior between .NET 4.6 and .NET Core? In which case, this is likely just a test bug? |
Right, I was wrong. |
In that case, I suggest the [ActiveIssue] not be removed from the test, even if we want to change the culture references as this PR is doing. Or, should this PR just be closed out? |
@stephentoub I suggest to open new issue for this failure and put it number in |
I'm fine with that. Can you do so and update your PR accordingly?
@krwq, @ellismg, or @tarekgh may have more thoughts? For reference, the issue being questioned is that with the following code:
if culture is "en-US", this throws a FormatException, but if culture is "uk-UA", it completes without error. That's true for both .NET Framework 4.6 and .NET Core. I assume this has something to do with the definition of whitespace in different cultures? |
be65b13
to
aa585bc
Compare
This fixes a bunch of tests which fail due to decimal separator is not a dot (#1491). But test method still disabled due to #1642
aa585bc
to
8d254c2
Compare
done #1642 |
Thanks, LGTM |
This test can reliably written by checking CurrentCulture.NumberFormat.NumberGroupSeparator if this property return space, then parsing will succeed otherwise it should throw. I didn't try it though so it is worth to try it. |
Fix a failing BigInteger outer loop test
Fix a failing BigInteger outer loop test Commit migrated from dotnet/corefx@9178d18
Ref #1491