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 issues with showing failed @test results #22315

Merged
merged 4 commits into from
Jun 13, 2017
Merged

Conversation

omus
Copy link
Member

@omus omus commented Jun 9, 2017

Fixes a variety of issues found while working on #22296

julia> using Base.Test

julia> x, y, z = 1:3;

julia> @test x  y
Test Failed
  Expression: x  y
   Evaluated: 1 isapprox 2
ERROR: There was an error during testing

julia> @test x == y == z
Test Failed
  Expression: $(Expr(:escape, :x)) $(Expr(:escape, :(==))) $(Expr(:escape, :y)) $(Expr(:escape, :(==))) $(Expr(:escape, :z))
   Evaluated: 1 == 2 == 3
ERROR: There was an error during testing

omus added 4 commits June 9, 2017 11:53
Escaping the ≈ operator would result in the displayed evaluated
expression appearing as `x isapprox y` instead of `x ≈ y`. Additionally,
the code was written to ensure that the arguments of `@test` are only
evaluated once.
@omus omus added the testsystem The unit testing framework and Test stdlib label Jun 9, 2017
@JeffBezanson JeffBezanson merged commit 493311b into master Jun 13, 2017
@StefanKarpinski StefanKarpinski deleted the cv/test-fixes branch June 13, 2017 22:02
tkelman pushed a commit that referenced this pull request Jun 17, 2017
(cherry picked from commit f2805a5)
ref #22315

Revise `get_test_result` to work correctly with ≈

Escaping the ≈ operator would result in the displayed evaluated
expression appearing as `x isapprox y` instead of `x ≈ y`. Additionally,
the code was written to ensure that the arguments of `@test` are only
evaluated once.

(cherry picked from commit a7ba25b)

Update tests to check expression output

(cherry picked from commit 2a37b80)

Add test for comparison calls

(cherry picked from commit d4e2b57)
@omus omus mentioned this pull request Jun 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testsystem The unit testing framework and Test stdlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants