• Aaron Krajeski's avatar
    Add epislon to matrix tests to fix 0 = -0 problem · a9818a74
    Aaron Krajeski authored
    This test has a pretty brittle expectation of failure for 0 != -0/
    This is of course nonsense. (The astute reader will no doubt notice
    that 0 does indeed exactly equal -0).
    
    Fortunately there was already the idea of epsilon differences in the
    test that were unused. Turning them on fixes the problem and allows up
    to delete the expectation.
    
    Also, in testharness assert_approx_equals(Infinity, Infinity, epsilon)
    and assert_approx_equals(NaN, NaN, epsilon) were both returning false.
    Considering assert_equals(Infinity, Infinity) and assert_equals(NaN, NaN)
    are both true, this seems silly.
    
    Bug: 1140535
    Change-Id: Ie8a3977b3d97b920903a08a6301705c8c14fc6e4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2498791Reviewed-by: default avatarAaron Krajeski <aaronhk@chromium.org>
    Reviewed-by: default avatarJuanmi Huertas <juanmihd@chromium.org>
    Commit-Queue: Aaron Krajeski <aaronhk@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#821249}
    a9818a74
testharness.js 146 KB