caramelo-macros 0.1.0

Caramelo macros
Documentation

caramelo-macros

Crates.io downloads crates.io Build Status Crates.io MSRV Documentation MIT licensed codecov

Do you find yourself writing a lot of repetitive test code? Do you want to make your tests more readable and easier to understand? If so, caramelo-macros is for you!

Type less, test more!

Quick Start

Add caramelo-macros to your Cargo.toml:

caramelo-macros = { version = "0.1.0" }

Usage Example

Here's how simple it is to create unit tests with caramelo-macros:

use caramelo_macros::{eq, is, lt, ne};

#[test]
fn test_expect_is() {
    let value = Some(1);
    is!(&value; Some(1));
}

#[test]
fn test_expect_eq() {
    let value = 1;
    eq!(&value; &1);
}

#[test]
fn test_expect_ne() {
    let value = 1;
    ne!(&value; &2);
}

#[test]
fn test_expect_lt() {
    let value = 1;
    lt!(&value; &2);
}

License

Licensed under either of

at your option.

Author

Rogerio Pereira Araujo rogerio.araujo@gmail.com