Skip to content
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

Fix Set rehash! test #11892

Merged
merged 1 commit into from
Jun 27, 2015
Merged

Fix Set rehash! test #11892

merged 1 commit into from
Jun 27, 2015

Conversation

yuyichao
Copy link
Contributor

Rework of #11795
Fix #11890

@yuyichao
Copy link
Contributor Author

The assumption made here is that a second rehash should be no-op.

@tkelman
Copy link
Contributor

tkelman commented Jun 27, 2015

lgtm, thanks!

yuyichao added a commit that referenced this pull request Jun 27, 2015
@yuyichao yuyichao merged commit a1c932a into master Jun 27, 2015
@tkelman tkelman deleted the yyc/set-rehash branch June 27, 2015 18:28
@tkelman tkelman mentioned this pull request Jun 27, 2015
s = Set(1:5)
k = s.dict.keys
Base.rehash!(s)
@test !isequal(s.dict.keys, k)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we could do:

@test pointer(s.dict.keys) != pointer(k)

We need a != test of some sort to check that the rehash was not a no-op (which would pass the new test).

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