Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao committed Jan 9, 2015
1 parent 029c845 commit b614c3f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,22 @@ end
# parametric type instantiation printing
immutable TParametricPrint{a}; end
@test sprint(show, :(TParametricPrint{false}())) == ":(TParametricPrint{false}())"

# Pull Request 9635
abstract InvokeType9635
abstract MethodType9635 <: InvokeType9635
type InstanceType9635 <: MethodType9635
end
let
f9635(::MethodType9635) = nothing
local err::MethodError
try
invoke(f9635, (InvokeType9635,), InstanceType9635())
catch err
end
buff = IOBuffer()
showerror(buff, err)
err_str = takebuf_string(buff)
@test match(r"::InstanceType9635", err_str) === nothing
@test isa(match(r"::InvokeType9635", err_str), RegexMatch)
end

0 comments on commit b614c3f

Please sign in to comment.