1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Module to re-export commonly used assertion macros so that they can be uniformly imported by
//! tests as `use crate::tests::asserts::*;`, and so that dependencies can be better managed.
//!
//! Test modules should `use crate::tests::asserts::*;`, to glob import all assertions macros. If
//! there are "`assert_eq/ne` is ambiguous" errors, they should also add
//! `use shadow_asserts::{assert_eq, assert_ne};` to shadow the prelude's `assert_eq/ne` macros.
// @todo Investigating using `all_asserts::{assert_range, assert_nrange}` for range checks.
pub use ;
pub use ;
/// These `assert_eq` and `assert_ne` re-exports are actually never used, since glob imports are not
/// allowed to shadow imports in the prelude. However, they trigger an error that "`assert_eq/ne` is
/// ambiguous", which forces the user to `use shadow_asserts::{assert_eq, assert_ne};` and therefore
/// prevents silently using the wrong `assert_eq` and `assert_ne` macros from the prelude.
// @todo: Consider using `pretty_assertions::assert_matches!` macro when it stabilizes.
pub use ;
pub
pub use assert_abs_diff_eq;
pub const TESTS_EPSILON: f64 = 0.0001;
/// `assert_eq_flt_test!` that forwards to `assert_abs_diff_eq!` with a predefined epsilon for tests
///
/// @todo It would be great if these could be made to work like `pretty_assertions`, showing diffs.
pub use assert_eq_flt_test;