Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

requirements.integration.self_test

Requirements index · View definition

evidence Valid

Requirement

The Habeas crate MUST have a Cargo integration test that invokes habeas::validate() against its own project, so its own requirements and evidence are checked recursively by cargo test.

Rationale

The requirement has one obligation: the crate MUST have a Cargo integration test that calls habeas::validate() against its own project.

  • Test exists: tests/habeas.rs, fn habeas() is a #[test] in the tests/ directory, so Cargo builds it as an integration test. It calls habeas::validate() and carries {test} for requirements.integration.self_test.
  • Runs against its own project: validate() in src/lib.rs takes the current directory (std::env::current_dir()) as its starting point. Cargo runs integration tests with the package root as the working directory, so the call checks Habeas’s own requirements and evidence under cargo test. I read only the top of validate(), not the full function.
  • No {impl} needed: the obligation is to have the test itself, so the test is the implementation. validate() already carries {impl} for requirements.integration.validate.
  • No other gaps: no unspecified behavior and no {fixme} apply. The test body is a plain call that asserts nothing itself, but validate() panics on failure, so the obligation is met.

Inputs

Tests

Input 2: outline tests/habeas.rs fn[habeas]
// {test}`requirements.integration.self_test`
#[test]
fn habeas() {
    habeas::validate();
}

Other sources

Input 1: requirements selection requirements.integration.self_test
:::{req} self_test
The Habeas crate MUST have a Cargo integration test that invokes `habeas::validate()` against its own project, so its own requirements and evidence are checked recursively by `cargo test`.
:::