Uh oh!
There was an error while loading. Please reload this page.
KeyAnalyzer tests. - #90301
Conversation
ghost
commented
Aug 10, 2023
Tagging subscribers to this area: @dotnet/area-system-collections Issue DetailsHoisted the calculation of the maximum collisions allow outside the Hoisted the calculation of the maximum offset outside of the offset Made ContainsAnyLetters and SufficientUniquenessFactor Added tests for ContainsAnyLetters and SufficientUniquenessFactor are working correctly.
|
stephentoub
commented
Aug 10, 2023
Can we please undo the hoisting-related changes then? Let's keep this just tests. |
Removed the one that isn't needed for testing. |
Made ContainsAnyLetters and SufficientUniquenessFactor internal so they can be tested. Hoisted the calculation of the maximum collisions allowed outside the HasSufficientUniquenessFactor for testability (the calculation only needs to be done once). Added tests for ContainsAnyLetters and SufficientUniquenessFactor are working correctly.
ba0c068 to
4f7dbe4Compare
adamsitnik
left a comment
There was a problem hiding this comment.
Thank you for your contribution!
The test is failing, but I think I've found the reason. I am going to apply my suggestion and merge it if the CI gets green.
Uh oh!
There was an error while loading. Please reload this page.
IDisposable
commented
Oct 19, 2023
Yep, that was from when it was still using my other Since we're not using that code right now, the test was wrong, sorry. Thanks for fixing it. |
adamsitnik
left a comment
There was a problem hiding this comment.
LGTM, thank you @IDisposable !
This is based extracting the unit tests for KeyAnalyzer and a couple trivial code simplifications without the huge changes in PR #89863
Hoisted the calculation of the maximum collisions allow outside the
HasSufficientUniquenessFactoras the calculation only needs to be done once (also makes it more testable).Made
ContainsAnyLettersandSufficientUniquenessFactorinternalso they can be tested.Added tests for
ContainsAnyLettersandSufficientUniquenessFactorare working correctly.