#testing #output #capture #expected #actual

test-toolbox

This library provides useful macros for unit testing

1 unstable release

0.1.0 Aug 21, 2021

#197 in Testing

MIT license

22KB
391 lines

test-toolbox

Utility library of helper macros for working with unit tests.

Macros

  • actual! - declare actual variable with differing debug and release syntax
  • expect! - declare expected variable with differing debug and release values
  • capture! - captures stdout and stderr for testing output

Resources

  • Docs for more detailed information

Usage

Each macro is gated by a feature.

No feature is mutually exclusive and can be combined as needed.

[dependencies]
test-toolbox = { version = "0.1", features = ["actual", "capture", "expect"] }

Implemented

  • actual! macro
  • expect macro
  • capture! macro

lib.rs:

Utility library of helper macros for working with unit tests.

Macros

  • actual! - declare actual variable with differing debug and release syntax
  • expect! - declare expected variable with differing debug and release values
  • capture! - captures stdout and stderr for testing output

Dependencies

~235KB