data-test 0.1.2

Simple data-test (aka table-test), without custom test to run with your test runner
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented2 out of 2 items with examples
  • Size
  • Source code size: 6.42 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.09 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • jhg/data-test-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jhg

Data-Test

Rust data-test (aka table-test) helpers

Build Status GitHub Crates.io

Getting Started

Add to your test dependencies:

[dev-dependencies]

data-test = "^0.1"

Example of usage:

#[cfg(test)]
mod tests {
    use data_test::data_test;

    #[test]
    fn it_works() {
        assert_eq!(2 + 2, 4);
    }

    data_test! {
        fn is_equal(input, expected) => {
            assert_eq!(input, expected);
        }
        - a (1, 1)
        - b (2, 2)
        - c (3, 3)
        - d (4, 4)
        - e (5, 5)
        - f ("hello world", "hello world")
    }
}
// cargo test output:
// test tests::it_works ... ok
// test tests::is_equal::a ... ok
// test tests::is_equal::b ... ok
// test tests::is_equal::c ... ok
// test tests::is_equal::d ... ok
// test tests::is_equal::e ... ok
// test tests::is_equal::f ... ok