-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Tests for IntSet. Includes two bug fixes #12247
Conversation
@@ -274,7 +274,7 @@ function ==(s1::IntSet, s2::IntSet) | |||
return false | |||
end | |||
end | |||
filln = s1.fill1s ? UInt32(-1) : UInt32(0) | |||
filln = s1.fill1s ? reinterpret(UInt32, Int32(-1)) : UInt32(0) |
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.
Hah, even stronger evidence that nobody is using complements (at least not on master).
I would spell this 0xffffffff
or -1 % UInt32
, but it's not a big deal since Julia/LLVM can figure all three out and inlines them all down to the constant.
Nice work. 👍 |
This looks good. Would it be possible to rebase a bit so all the new tests show up in one commit? E.g. so that "First additional", "Finish", and "Refine" are all in one commit? @mbauman does that sound reasonable to you? |
Sure, I'll rebase when I get a moment. |
By the way, I was thinking of adding a constructor to be able to do |
Two commits sounds logical (move tests + your additions). The deprecated constructor is so all set-like constructors take just one iterable. If we have both, there's an ambiguity with one argument: does |
Hm, actually, it doesn't look like it was deprecated in 0.3. It was just straight-up removed? |
It's in I see the point about constructors. I'll squash down to just 2 commits. |
e71f7b0
to
d60483a
Compare
Correct untested bug in symdiff! in intset.jl Fix a bug in intset
Moved existing IntSet tests from sets.jl to intset.jl First additional tests for intset Finish intset tests Refine intset tests
d60483a
to
562eac0
Compare
This is ready once Travis turns green. @mbauman For the constructor, how about the following?
This allows e.g.
|
Then what does |
True, good point. Sorry for the noise. |
No worries. This looks great. Thanks! |
Glad you like it, thanks! |
Tests for IntSet. Includes two bug fixes
Looks like Coveralls isn't updating. |
No description provided.