-
Notifications
You must be signed in to change notification settings - Fork 398
Add tests for de-CH #799
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
Add tests for de-CH #799
Conversation
Codecov Report
@@ Coverage Diff @@
## master #799 +/- ##
=======================================
Coverage 80.51% 80.51%
=======================================
Files 280 280
Lines 41851 41851
=======================================
Hits 33696 33696
Misses 8155 8155 Continue to review full report at Codecov.
|
AssertEx.EqualTolerance(expectedFeet, result.Feet, 1e-5); | ||
} | ||
|
||
public static IEnumerable<object[]> InvalidData => new List<object[]> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want, we could refactor this to combinatorial parameters. It would make it a lot less verbose to cover all the same test cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh man. I Googled for it using the word "matrix" as was bummed thinking you couldn't do it. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matrix was my first go to search as well :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and I implemented it first in a do-it-yourself way (see patch below)
Now this did fail for me... This was partially my misstake. And more seriously Microsoft's... Windows decided recently to change some of the culture defaults. In this case, the default thousands separator for de-CH is ’ (a typographic apostrophe), while I (for whatever reason, probably because it always was like this) have set it to ' (the normal apostrophe). Now using Note 1: Always use Note 2: That doesn't solve the general problem that if the separator is set to ', the problem arises. |
0001-Separate-culture-from-string-list.txt Here's a suggested patch for this PR. Supports mixing arbitrary cultures with arbitrary test data without cloning all the strings. Tests are written to fail (due to the manipulated "de-AT" culture settings) |
I updated the tests but upon further reflection I don't think it's the way to go. A string of |
c63ee87
to
64923d2
Compare
Doh. Force push fail. |
I guess you are right, the new tests didn't really add anything. If we are testing more cultures, it should test new inputs I think. |
Also, the other PR is removing support for thousand separators so that input variation goes out the window here. |
Yea we definitely don't want to remove that ability. I created #803 as a starting point. |
I belive you are right. While there are (very few) use cases for american units in europe, they rarely ever use a combination of feet and inches. Pilots use feet for altitude and screen sizes are advertised in inches, but if you give the height of a persion with 5' 3" you'll be looked at very peculiarly. While ' for ft is rare, using " for inches is common in places where this is still in use. Therefore, I think it is ok that this isn't fully working, however builds should not fail, regardless of current culture of the developer and the failure should be consistent and well defined. Your new PR is getting to that. |
No description provided.