Crate test_util

source ·
Expand description

This crate defines a collection of useful utilities for testing rust code.

Macros§

  • Asserts that the first argument is greater than or equal to the second.
  • Asserts that the first argument is strictly greater than the second.
  • Asserts that the first argument is less than or equal to the second.
  • Asserts that the first argument is strictly less than the second.
  • Asserts that x and y are within delta of one another.

Structs§

  • A mutually exclusive counter that is not shareable, but can be defined statically for the duration of a test. This simplifies the implementation of a simple test-global counter, avoiding the complexity of alternatives like std::sync::atomic objects that are typically wrapped in Arc()s, cloned, and require non-intuitive memory management options.