Module googletest::prelude
source · Expand description
Re-exports of the symbols in this crate which are most likely to be used.
This includes:
- All assertion macros,
- Traits and type definitions normally used by tests, and
- All built-in matchers.
Typically, one imports everything in the prelude in one’s test module:
mod tests {
use googletest::prelude::*;
}
Re-exports
pub use super::matcher::Matcher;
pub use super::verify_current_test_outcome;
pub use super::GoogleTestSupport;
pub use super::IntoTestResult;
pub use super::Result;
pub use super::matchers::*;
Macros
- Matches the given value against the given matcher, panicking if it does not match.
- Asserts that the given predicate applied to the given arguments returns true, failing the test but continuing execution if not.
- Matches the given value against the given matcher, marking the test as failed but continuing execution if it does not match.
- Evaluates to a
Result
which contains anErr
variant with the given test failure message. - Asserts that the given predicate applied to the given arguments returns true.
- Checks whether the
Matcher
given by the second argument matches the first argument.