-
-
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
Add test for PR #17803 #17961
Add test for PR #17803 #17961
Conversation
The PR fixes jl_static_show for bitstypes
Base.link_pipe(p; julia_only_read=true, julia_only_write=true) | ||
ccall(:jl_static_show, Void, (Ptr{Void}, Any), p.in, "world") | ||
@async close(p.in) | ||
@test readstring(p.out) == "\"world\"" |
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 only thing I was wondering about is the cache/blocking behavior of Pipe
since the test is writing to a pipe without a reader.
This is also not testing what the PR fixes. You should test sth like Int128(-1)
instead.
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.
And what's the expected output for readstring(p.out)
? "Int128(0xffffffffffffffffffffffffffffffff)"
?
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.
Yes.
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 only thing I was wondering about is the cache/blocking behavior of Pipe since the test is writing to a pipe without a reader.
It should be OK; there's no blocking API call before the readstring.
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.
So the buffer size is larger than length("Int128(0xffffffffffffffffffffffffffffffff)")
everywhere?
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 buffering is done by the writer, so it's ~2^31
minimum (on the platforms we support) :P
Looks like Travis timed out |
@yuyichao can we merge this? |
The PR #17803 fixes
jl_static_show
forbitstypes
. This provides a test for that PR.