Skip to content

JonathanWoollett-Light/sequential-test

Repository files navigation

sequential-test

Version Downloads Docs APACHE 2.0 license

If you want a more fully featured mature implementation checkout palfrey/serial_test

Allows for the creation of sequential tests.

#[cfg(test)]
mod tests {
    #[test]
    #[sequential]
    fn test1() {
        // ...
    }
    #[test]
    #[sequential]
    fn test2() {
        // ...
    }
    #[test]
    #[parallel]
    fn test3() {
        // ...
    }
}
  • Tests with the sequential attribute are guaranteed to be executed sequentially.
  • Tests with the parallel attribute may run in parallel of each other but will not run at the same time as tests with the sequential attribute.
  • Tests with neither attributes may run in parallel with any tests.

Defining sequential or parallel attributes on non-tests or within scopes is considered UB.

This library is faster1 and smaller but less tested and younger than serial_test.

Footnotes

  1. The current benchmark illustrate sequential-test covers the test set in an average of ~350ms while serial_test covers the test set in an average of ~550ms.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published