Julia: add special display for ≈ test failures

Created on 6 Jan 2017  Â·  3Comments  Â·  Source: JuliaLang/julia

As noted by @cstjean in https://github.com/JuliaLang/julia/pull/19880, @test a ≈ b differs from @test_approx_eq a b in that the former doesn't display test failures quite as nicely. We already have specialized code for displaying some kinds of comparisons nicely, so perhaps we should have more logic there to display approximate equality failures as nicely as @test_approx_eq does.

Hacktoberfest display and printing help wanted testsystem

Most helpful comment

I believe this was addressed by https://github.com/JuliaLang/julia/pull/30721

All 3 comments

@StefanKarpinski I would like to work on this. A little more info on what is to be done?

julia> using Test

julia> @test 2.1 ≈ 1+1
Test Failed at REPL[2]:1
  Expression: 2.1 ≈ 1 + 1
   Evaluated: 2.1 ≈ 2
ERROR: There was an error during testing

julia> @test 2.1 == 1+1
Test Failed at REPL[3]:1
  Expression: 2.1 == 1 + 1
   Evaluated: 2.1 == 2
ERROR: There was an error during testing

looks find on master now?

I believe this was addressed by https://github.com/JuliaLang/julia/pull/30721

Was this page helpful?
0 / 5 - 0 ratings

Related issues

manor picture manor  Â·  3Comments

arshpreetsingh picture arshpreetsingh  Â·  3Comments

StefanKarpinski picture StefanKarpinski  Â·  3Comments

i-apellaniz picture i-apellaniz  Â·  3Comments

dpsanders picture dpsanders  Â·  3Comments