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

m-j-w picture m-j-w  ·  3Comments

wilburtownsend picture wilburtownsend  ·  3Comments

manor picture manor  ·  3Comments

iamed2 picture iamed2  ·  3Comments

musm picture musm  ·  3Comments