mock_todo 0.1.0

A macro that makes it easy to mock todo with values to make the code compilable.
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 15.26 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.02 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • regpab/mock_todo
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • regpab

A macro that makes it easy to mock todo with values to make the code compilable.

The macro has two features:

  • todo: works like a normal todo.
  • mock: returns the mock value we provide.

Installation

[dependencies]
mock_todo = { version = "0.1.0", features = ["mock"] }
# use the following commented line if you want to use a regular todo.
# mock_todo = { version = "0.1.0", features = ["todo"] }

Example of usage

use mock_todo::mock_todo;
// returns 0 if the feature is "mock" and panics with the message "not yet implemented: Add feature" otherwise.
fn feature() -> u32 {
    // first argument can be ommited.
    mock_todo!("Add feature", 0)
}