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

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 an Err 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.