Skip to content

fodil-a/doubts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Convenience, to write more explicit tests

Build Status Latest Version Rust Documentation

This crate provides an unique macro to write more explicit tests.

First, add dependency

[dev-dependencies]
doubts="0.1.0"

Then declare the use of this crate:

#[macro_use]
#[cfg(test)]
extern crate doubts;

Finally, write tests:

#[cfg(test)]
mod tests {
    #[test]
    fn test() {
        let v = vec![1, 2];
        assert_that!(v, has len == 2);
        assert_that!(v, has capacity == 2);
        assert_that!(v, contains &2);
    }
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages