-
Notifications
You must be signed in to change notification settings - Fork 33
Conversation
@@ -271,7 +275,7 @@ end | |||
|
|||
@test_zip [1,2,3] [:a, :b, :c] ['x', 'y', 'z'] | |||
@test_zip [1,2,3] [:a, :b] ['w', 'x', 'y', 'z'] | |||
@test_zip [1,2,3] @compat(Union{})[] ['w', 'x', 'y', 'z'] |
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.
Why are these changed?
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.
The type of the empty array is not material to the test. It was only changed from []
to avoid a deprecation warning from JuliaLang/julia#8578.
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.
[]
is Union{}[]
on 0.3. And this feels like a corner case that still worth testing.
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.
Alright, testing both now.
@@ -122,26 +126,26 @@ end | |||
|
|||
# Empty arrays | |||
test_imap( | |||
Any[], |
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.
Also these.
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.
This is really not designed to test that. What adding those would really be testing is Union{}[] == Any[]
which is not in the scope of Iterators.
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.
Well, those test was written in that way to begin with.
It's hard to say if it's in scope of Iterators but it doesn't hurt to not change the tests.
@@ -126,26 +126,26 @@ end | |||
|
|||
# Empty arrays | |||
test_imap( | |||
[], |
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.
This and the last one is still wrong.
@@ -294,7 +299,7 @@ macro test_enumerate(input) | |||
end | |||
|
|||
@test_enumerate [:a, :b, :c] | |||
@test_enumerate @compat(Union{})[] | |||
@test_enumerate [] |
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.
Also, here..... I was trying to not leave a comment at every single place.
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.
Ugh, sorry. Missed that one in the first batch.
@@ -299,7 +309,8 @@ macro test_enumerate(input) | |||
end | |||
|
|||
@test_enumerate [:a, :b, :c] | |||
@test_enumerate [] | |||
@test_enumerate Union{}[] | |||
@test_enumerate Any[] |
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.
Note that on 0.4+ Any[]
is the same with []
. Doesn't really mater which one to use.
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.
Yep. Just being more explicit as these tests are no longer just meant to test "empty arrays".
🎉
Some
Union{}[]
andAny[]
andAny[...]
were changed to[]
and[...]
.v0.3 support was dropped per the METADATA freeze. Code that only runs on versions before the v0.4.0 release was deleted, and unnecessary
Compat
usage was deleted. The oldtest/test.jl
file was deleted as its contents are replicated/improved intest/runtests.jl
(thetest/perf.jl
wasn't removed, as it is not yet brought up to date).v0.5 support was fixed and tested.