Skip to content

Commit

Permalink
Add new Base.Test
Browse files Browse the repository at this point in the history
  • Loading branch information
IainNZ committed Sep 21, 2015
1 parent 7d022e8 commit dc4f179
Show file tree
Hide file tree
Showing 3 changed files with 643 additions and 172 deletions.
37 changes: 0 additions & 37 deletions base/docs/helpdb.jl
Original file line number Diff line number Diff line change
Expand Up @@ -520,43 +520,6 @@ Return `true` iff an array is heap-ordered according to the given order.
"""
Collections.isheap

# Base.Test

doc"""
@test_throws(extype, ex)
Test that the expression `ex` throws an exception of type `extype` and calls the current handler to handle the result.
"""
:(Test.@test_throws)

doc"""
@test_approx_eq_eps(a, b, tol)
Test two floating point numbers `a` and `b` for equality taking in account a margin of tolerance given by `tol`.
"""
:(Test.@test_approx_eq_eps)

doc"""
@test(ex)
Test the expression `ex` and calls the current handler to handle the result.
"""
:(Test.@test)

doc"""
@test_approx_eq(a, b)
Test two floating point numbers `a` and `b` for equality taking in account small numerical errors.
"""
:(Test.@test_approx_eq)

doc"""
with_handler(f, handler)
Run the function `f` using the `handler` as the handler.
"""
Test.with_handler

# Base.Profile

doc"""
Expand Down
Loading

5 comments on commit dc4f179

@tomasaschan
Copy link
Member

Choose a reason for hiding this comment

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

This is all very nice, but I'm missing a replacement for with_handler (at least in the docs). Is there any plans for this?

This is currently breaking the build against nightly on JuliaMath/Interpolations.jl#71

@IainNZ
Copy link
Member Author

@IainNZ IainNZ commented on dc4f179 Sep 23, 2015

Choose a reason for hiding this comment

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

Yes, sorry about that. Hoping to put it back in with deprecation warnings.
Am I correct in observing that you are only using it here: https://github.com/tlycken/Interpolations.jl/blob/7646fe923f4c9e04e23cff2f26222917cbe9b4cb/test/scaling/nointerp.jl ?
It might be easier just to replace that with a try-catch that checks the error message

@tomasaschan
Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I think that's my only usage, so that's feasible for me. And since PkgEval hasn't had any major breakage, I guess I was pretty much the only one using it :P

I did find the helpers handy, though, so I'd much like to see something that fills the same function re-added into this incarnation of Base.Test.

@IainNZ
Copy link
Member Author

@IainNZ IainNZ commented on dc4f179 Sep 24, 2015

Choose a reason for hiding this comment

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

Definitely planned

@tomasaschan
Copy link
Member

Choose a reason for hiding this comment

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

👍

Please sign in to comment.