How to use rstest crate in Rust test framework

Add rstest as a dev-dependency and use #[rstest] and #[case] macros to run parameterized tests in Rust.

Use rstest by adding it as a dev-dependency in Cargo.toml and annotating test functions with #[rstest] to define parameters.

// Cargo.toml
[dev-dependencies]
rstest = "0.23"

// src/lib.rs
use rstest::rstest;

#[rstest]
#[case(2, 4, 6)]
#[case(10, 20, 30)]
fn test_add(#[case] a: i32, #[case] b: i32, #[case] expected: i32) {
    assert_eq!(a + b, expected);
}

Run the tests with cargo test.