PackageTrack
Sign in Get early access

test-case-macros

Provides #[test_case(...)] procedural macro attribute for generating parametrized test cases easily

3.3.1 55M downloads/mo #1163 most downloaded on crates.io frondeus/test-case

What this package is like to depend on

Last release 3 years ago

no release in 18 months

Ships fairly regularly

a new release about every 2 months

Nearly every release is documented

notes for 9 of 9 stable releases

Nothing withdrawn

no release was ever pulled

4 years old

9 releases · first in 2022

0 releases in the last 12 months

see the full history below

Release timeline

9 releases · May 2022 to Nov 2023
2023 2024 2025 2026
Release Pre-release

Releases

latest 9
  1. 3.3.1 17 Nov 2023
    Release notes

    What's Changed

    • Avoid emitting unnecessary error messages by test cases & remove proc-macro2-diagnostics dependency by @dtolnay in #138

    New Contributors

    Full Changelog: v3.3.0...v3.3.1

    Open source →
    Release notes

    Fixes

    • Avoid emitting additional misleading error messages by proc-macro2-diagnostics (#138)
    Open source →
  2. 3.3.0 17 Nov 2023
    Release notes

    What's Changed

    • Fix test_matrix example that does not compile in README by @ollien in #133
    • Add the ability to have comments in matrix tests by @ollien in #132
    • Remove proc-macro-error dependency by @tamird in #136
    • .github: replace actions-rs with dtolnay/rust-toolchain, add caching by @tamird in #137

    New Contributors

    Full Changelog: v3.2.1...v3.3.0

    Open source →
    Release notes

    Features

    • Allow comments in test-matrix macro (#132)

    Improvements

    • Drop proc-macro-error dependency & improve error messages (#136)
    Open source →
  3. 3.2.1 17 Sep 2023
    Release notes
    • Update syn dependency
    • Ensure that test-case targets latest core and macros subcrates.

    Full Changelog: v3.2.0...v3.2.1

    Open source →
    Release notes

    Improvements

    • Update syn dependency to 2.0
    • Ensure that test-case selects correct version of it's core and macros subcrates
    Open source →
  4. 3.2.0 16 Sep 2023
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v3.1.0...v3.2.0

    Open source →
    Release notes

    Features

    • Add test_matrix macro: generates test cases from Cartesian product of possible test function argument values (#128)

    Improvements

    • Retain allow attributes on test functions (#127)
    Open source →
  5. 3.1.0 02 Apr 2023
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v3.0.0...v3.1.0

    Open source →
    Release notes

    Features

    • Copy attribute span to generated test functions so that IDEs recognize them properly as individual tests

    Improvements

    • Added LICENSE file to child crates
    Open source →
  6. 3.0.0 13 Feb 2023
    Release notes

    Overview

    This crate provides the #[test_case] procedural macro attribute that generates multiple parametrized tests using one body with different input parameters.
    A test is generated for each data set passed in the test_case attribute.
    Under the hood, all test cases that share the same body are grouped into a mod, giving clear and readable test results.

    Changes

    • Split out test-case-core crate, allowing easier reuse in external crates. By @evforde

    IMPORTANT

    Starting with the 3.0 release, we are changing test-case MSRV policy. We no longer can maintain our goal of only bumping MSRV with major SemVer releases partly due to how fast rust landscape changes and partly to how the rest of the rust ecosystem prefers instead not to keep MSRV breakage treated as SemVer breakage, making stricter policies hard to maintain with limited resources we have. The current goal is to support up to 3 of the latest stable releases.
    We hope that with this change, we'll be able to speed up test-case's maintenance processes and add more features in the coming months.

    Open source →
    Release notes

    [IMPORTANT] Starting with 3.0 release we are changing test-case MSRV policy to support only 3 latest stable releases.

    Improvements

    • Split out functional parts of test-case-macros crate into test-case-core for easy reuse by external libraries
    Open source →
  7. 2.2.2 01 Oct 2022
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v2.2.1...v2.2.2

    Open source →
    Release notes

    Fixes

    • Use fully qualified test macro path to avoid conflicts in workspace (#105)
    Open source →
  8. 2.2.1 21 Jul 2022
    Release notes

    Bugfix release - ensure test-case depends on correct version of test-case-macros
    Full Changelog: v2.2.0...v2.2.1

    Open source →
    Release notes

    Fixes

    • Ensure test-case depends on correct version of test-case-macros
    Open source →
  9. 2.1.0 18 May 2022
    Release notes

    What's Changed

    Full Changelog: v2.0.2...v2.1.0

    Open source →
    Release notes

    Features

    • Support matches_regex complex test-case (requires with-regex feature) (#98)
    • Support len, count and empty complex test-cases (#97)

    Fixes

    • Support keyword ignore on void fn (#100)

    Improvements

    • Move macros to separate subcrate so that test-case can export other things (#96)
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive