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

Add test for PR #17803 #17961

Merged
merged 2 commits into from
Aug 21, 2016
Merged

Add test for PR #17803 #17961

merged 2 commits into from
Aug 21, 2016

Conversation

ranjanan
Copy link
Contributor

The PR #17803 fixes jl_static_show for bitstypes. This provides a test for that PR.

The PR fixes jl_static_show for bitstypes
@tkelman tkelman added test This change adds or pertains to unit tests backport pending 0.4 labels Aug 11, 2016
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\""
Copy link
Contributor

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.

Copy link
Contributor Author

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)"?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes.

Copy link
Member

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.

Copy link
Contributor

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?

Copy link
Member

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

@ranjanan
Copy link
Contributor Author

Looks like Travis timed out

@tkelman
Copy link
Contributor

tkelman commented Aug 20, 2016

@yuyichao can we merge this?

@yuyichao yuyichao merged commit 3ddeb19 into JuliaLang:master Aug 21, 2016
tkelman pushed a commit that referenced this pull request Aug 21, 2016
The PR fixes jl_static_show for bitstypes

(cherry picked from commit 718391d)
ref #17961

Change test to Int128(-1)

(cherry picked from commit 462a1eb)
tkelman pushed a commit that referenced this pull request Sep 13, 2016
The PR fixes jl_static_show for bitstypes

(cherry picked from commit 718391d)
ref #17961

Change test to Int128(-1)

(cherry picked from commit 462a1eb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test This change adds or pertains to unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants