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 dump(io) and xdump(io), add tests #12072

Merged
merged 1 commit into from
Jul 9, 2015

Conversation

ScottPJones
Copy link
Contributor

This fixes a bug I ran across when trying to debug some issues with output.
dump and xdump were both defined with (x)dump(args...) and (x)dump(io::IO, args...),
so that (x)dump of a single argument of type <: IO would get an error.
Fixed by adding two methods: (x)dump(arg::IO) = xdump((x)dump,STDOUT::IO,arg)

jakebolewski added a commit that referenced this pull request Jul 9, 2015
Fix dump(io) and xdump(io), add tests
@jakebolewski jakebolewski merged commit 686bd24 into JuliaLang:master Jul 9, 2015
@@ -269,3 +269,12 @@ end
@test_repr "bitstype 100 B"
@test repr(:(bitstype A B)) == ":(bitstype A B)"
@test repr(:(bitstype 100 B)) == ":(bitstype 100 B)"

oldout = STDOUT
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be in let block and I don't think the try block or even the @test is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understand about the let block, but shouldn't it have the @test to make sure that it returns as expected?

@ScottPJones ScottPJones deleted the spj/dump branch August 11, 2015 15:28
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