Commit Graph

5 Commits

Author SHA1 Message Date
Ben Foppa 414ce4f332 Fix deprecated plugin syntax. 2015-02-16 13:55:58 -05:00
Eduard Bopp 5ca3e41375 Implement AssertEq for reference types
Just as the standard library's PartialEq is implemented for reference types,
the ApproxEq trait should be implemented on them as well. This is mostly an
ergonomic improvement for certain testing situations, where a method yields a
reference. For non-copy types it allows using the assert_approx_… macros, which
would otherwise not be possible.
2015-01-25 19:51:07 +01:00
Ben Foppa bd7b4f287f rustup 2015-01-07 15:14:40 -05:00
Mike Dilger 64130dfb2f tests for ApproxEq ULPs 2015-01-01 10:41:15 +13:00
Eduard Bopp 956c5cdecc Implement assertion macros for ApproxEq
These macros yield readable error messages as test assertions for ApproxEq
types. They can be invoked as:

    assert_approx_eq!(a, b);
    assert_approx_eq_eps!(a, b, eps);

Fixes #40.
2014-11-23 14:15:56 +01:00