Skip to content

Latest commit

 

History

History
98 lines (57 loc) · 1.7 KB

CHANGELOG.md

File metadata and controls

98 lines (57 loc) · 1.7 KB

Changelog

2.1.0 - 2024-03-06

Added

  • Parameterized tests now parse and regenerate the const, async, unsafe and extern function qualifiers for test functions.

Example

use yare::parameterized;

// NB: The underlying test macro also must support these qualifiers. For example, the default `#[test]` doesn't support async and unsafe.

#[parameterized(
    purple = { &[128, 0, 128] },
    orange = { &[255, 127, 0] },
)]
const extern "C" fn has_reds(streamed_color: &[u8]) {
    assert!(streamed_color.first().is_some());
}

Changed

  • MSRV is now 1.62

2.0.0 - 2023-10-16

Added

  • Test signature may now have return type, given that is also accepted by the #[test] macro.

Example

use yare::parameterized;

#[parameterized(
    ok = { Ok(0) },
    err = { Err("This case will fail".to_string()) },
)]
fn example_test(value: Result<u32, String>) -> Result<(), String> {
    let _ = value?;

    Ok(())
}

Changed

  • Breaking: Parameter and argument count now must match exactly

Removed

  • Breaking: Removed deprecated ide! macro

1.0.2 - 2022-08-19

Added

  • Added crate root documentation for rustdoc and docs.rs

Deprecated

  • Deprecated ide! macro