Skip to content

Revert "[StdLib] Extend ReflectionHashing test to pass on Linux" #933

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

Merged
merged 1 commit into from
Jan 10, 2016
Merged

Revert "[StdLib] Extend ReflectionHashing test to pass on Linux" #933

merged 1 commit into from
Jan 10, 2016

Conversation

ezephir
Copy link

@ezephir ezephir commented Jan 10, 2016

This test expects consistent hash code generation on any given platform.
However String instance generate different values on Linux depending on which
version of libicu is installed, causing environment-specific test failures.

This reverts commit def419b.

The specific situation here is that we're relying on libicu's collation elements to hash strings on platforms without objective-c interop. The values for collection elements returned by icu vary depending upon the specific version of ICU, the internal collation algorithm, and the version of Unicode that's being implemented. As a result, I don't seem to be able to mimic the other tests by checking for a static answer.

I've validated this in versions 52 (in Ubuntu 14.04) and 54 (in Fedora 23). I haven't yet tried on Ubuntu 15.10, but I expect it to be from 14.04.

@moiseev @gribozavr Can either of you tell me more about this test? Is reliance on stable hashing instrumental in this test's intent or just an implementation side effect?

This test expects consistent hash code generation on any given platform.
However String instance generate different values on Linux depending on which
version of libicu is installed, causing environment-specific test failures.

This reverts commit def419b.
moiseev added a commit that referenced this pull request Jan 10, 2016
Revert "[StdLib] Extend ReflectionHashing test to pass on Linux"
@moiseev moiseev merged commit 6e4f61c into swiftlang:master Jan 10, 2016
@gribozavr
Copy link
Contributor

@ezephir The test relies on the hash codes only incidentally. The test is supposed to test the custom mirror of Dictionary -- that it indeed allows to view all key-value pairs, for example.

It would be best to rewrite the test so that it does not depend on the output order.

MaxDesiatov pushed a commit to MaxDesiatov/swift that referenced this pull request May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants