Skip to content

Commit

Permalink
Doctest fixes after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed Jul 7, 2016
1 parent 92ce1f3 commit 90d4a31
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions doc/manual/mathematical-operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -400,20 +400,20 @@ The following examples show the different forms.

julia> Int8(128)
ERROR: InexactError()
in Int8(::Int64) at ./sysimg.jl:63
in Int8(::Int64) at ./sysimg.jl:53
...

julia> Int8(127.0)
127

julia> Int8(3.14)
ERROR: InexactError()
in Int8(::Float64) at ./sysimg.jl:63
in Int8(::Float64) at ./sysimg.jl:53
...

julia> Int8(128.0)
ERROR: InexactError()
in Int8(::Float64) at ./sysimg.jl:63
in Int8(::Float64) at ./sysimg.jl:53
...

julia> 127 % Int8
Expand Down
4 changes: 2 additions & 2 deletions doc/manual/methods.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,11 @@ Julia language. Core operations typically have dozens of methods:
+(a::Float16, b::Float16) at float16.jl:136
+(x::Float32, y::Float32) at float.jl:206
+(x::Float64, y::Float64) at float.jl:207
+(x::Bool, z::Complex{Bool}) at complex.jl:137
+(x::Bool, z::Complex{Bool}) at complex.jl:126
+(x::Bool, y::Bool) at bool.jl:48
+(x::Bool) at bool.jl:45
+{T<:AbstractFloat}(x::Bool, y::T) at bool.jl:55
+(x::Bool, z::Complex) at complex.jl:144
+(x::Bool, z::Complex) at complex.jl:133
+(x::Bool, A::AbstractArray{Bool,N<:Any}) at arraymath.jl:105
+(x::Char, y::Integer) at char.jl:40
...
Expand Down
2 changes: 1 addition & 1 deletion doc/manual/stacktraces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ by passing them into :func:`StackTraces.lookup`:

julia> frame = StackTraces.lookup(pointer)
1-element Array{StackFrame,1}:
in jl_backtrace_from_here at stackwalk.c:104
in jl_backtrace_from_here at stackwalk.c:105

julia> println("The top frame is from $(frame[1].func)!")
The top frame is from jl_backtrace_from_here!
8 changes: 4 additions & 4 deletions doc/manual/strings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,15 @@ such an invalid byte index, an error is thrown:

julia> s[2]
ERROR: UnicodeError: invalid character index
in slow_utf8_next(::Array{UInt8,1}, ::UInt8, ::Int64) at ./strings/string.jl:68
in next at ./strings/string.jl:93 [inlined]
in slow_utf8_next(::Array{UInt8,1}, ::UInt8, ::Int64) at ./strings/string.jl:67
in next at ./strings/string.jl:92 [inlined]
in getindex(::String, ::Int64) at ./strings/basic.jl:70
...

julia> s[3]
ERROR: UnicodeError: invalid character index
in slow_utf8_next(::Array{UInt8,1}, ::UInt8, ::Int64) at ./strings/string.jl:68
in next at ./strings/string.jl:93 [inlined]
in slow_utf8_next(::Array{UInt8,1}, ::UInt8, ::Int64) at ./strings/string.jl:67
in next at ./strings/string.jl:92 [inlined]
in getindex(::String, ::Int64) at ./strings/basic.jl:70
...

Expand Down
2 changes: 1 addition & 1 deletion doc/manual/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ each field:
ERROR: MethodError: Cannot `convert` an object of type Float64 to an object of type Point{Float64}
This may have arisen from a call to the constructor Point{Float64}(...),
since type constructors fall back to convert methods.
in Point{Float64}(::Float64) at ./sysimg.jl:63
in Point{Float64}(::Float64) at ./sysimg.jl:53
...

julia> Point{Float64}(1.0,2.0,3.0)
Expand Down
2 changes: 1 addition & 1 deletion doc/stdlib/collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ Dequeues

julia> deleteat!([6, 5, 4, 3, 2, 1], (2, 2))
ERROR: ArgumentError: indices must be unique and sorted
in deleteat!(::Array{Int64,1}, ::Tuple{Int64,Int64}) at ./array.jl:571
in deleteat!(::Array{Int64,1}, ::Tuple{Int64,Int64}) at ./array.jl:511
...

.. function:: splice!(collection, index, [replacement]) -> item
Expand Down
6 changes: 3 additions & 3 deletions doc/stdlib/test.rst
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,10 @@ writing new tests.
julia> @code_warntype f(1,2,3)
...
Body:
begin # none, line 1:
unless (Base.slt_int)(1,b::Int64)::Bool goto 4
begin
unless (Base.slt_int)(1,b::Int64)::Bool goto 3
return 1
4:
3:
return 1.0
end::UNION{FLOAT64,INT64}

Expand Down

0 comments on commit 90d4a31

Please sign in to comment.