cool_asserts/
lib.rs

1//! A collection of useful assertions and other utilities for writing
2//! tests in Rust.
3
4mod assert_matches;
5mod assert_panics;
6mod assertion_failure;
7
8#[doc(hidden)]
9pub mod iterators;
10
11#[doc(hidden)]
12pub mod length;
13
14#[doc(hidden)]
15pub use indent_write;
16
17pub use assert_panics::get_panic_message;
18
19#[doc(hidden)]
20#[macro_export]
21macro_rules! force_type {
22    (const $type:ty: $value:expr) => {{
23        const VALUE: $type = $value;
24        VALUE
25    }};
26
27    ($type:ty: $value:expr) => {
28        ::core::convert::identity::<$type>($value)
29    };
30}
31
32#[doc(hidden)]
33pub use core as secret_core;