qa 0.1.1

Requirements traceability for safety-critical Rust software
Documentation
use crate::RequirementType::*;

crate::requirements! {
    pub REQ_TEST_TRACING: Functional {
        description: "Tests must be linkable to one or more requirements via #[traces] attribute",
    }

    pub REQ_COMPOSABILITY: NonFunctional {
        description: "#[traces] must compose with #[test], #[rstest], #[should_panic]",
    }
}

use linkme::distributed_slice;

/// A link between a test function and a requirement.
///
/// Created by the [`#[traces]`](crate::traces) attribute macro.
/// Registered automatically with a `linkme` distributed slice.
#[derive(Debug)]
pub struct TestTrace {
    pub requirement_id: &'static str,
    pub test_name: &'static str,
    pub test_module: &'static str,
    pub file: &'static str,
    pub line: u32,
}

#[distributed_slice]
pub static TRACES: [TestTrace];