Skip to content

Commit

Permalink
Merge pull request #85 from lbenet/lbenet/AssertionError
Browse files Browse the repository at this point in the history
Add AssertionError as typealias of ExceptionError
  • Loading branch information
jakebolewski committed May 12, 2015
2 parents 7ea58c8 + 1273405 commit 5321a7c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Currently, the `@compat` macro supports the following syntaxes:

* `typealias AbstractString String` - `String` has been renamed to `AbstractString` [#8872](https://github.com/JuliaLang/julia/pull/8872)

* `typealias AssertionError ErrorException` - `AssertionError` was introduced in [##9734](https://github.com/JuliaLang/julia/pull/#9734); before `@assert` threw an `ErrorException`

* For all unsigned integer types to their equivalents with uppercase `I`. [#8907](https://github.com/JuliaLang/julia/pull/8907)

## New functions
Expand Down
5 changes: 5 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ if VERSION < v"0.4.0-dev+1387"
export AbstractString
end

if VERSION < v"0.4.0-dev+3324"
typealias AssertionError ErrorException
export AssertionError
end

if VERSION < v"0.4.0-dev+412"
eval(Base, :(const IPAddr = IpAddr))
end
Expand Down
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ using Compat
using Base.Test

v = 1
@test_throws AssertionError @assert(v < 1)

d = Dict{Int,Int}()
d[1] = 1
Expand Down

0 comments on commit 5321a7c

Please sign in to comment.