requirements.integration.self_test
Requirements index · View definition
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 bycargo 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 thetests/directory, so Cargo builds it as an integration test. It callshabeas::validate()and carries{test}forrequirements.integration.self_test. - Runs against its own project:
validate()insrc/lib.rstakes 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 undercargo test. I read only the top ofvalidate(), 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}forrequirements.integration.validate. - No other gaps: no unspecified behavior and no
{fixme}apply. The test body is a plain call that asserts nothing itself, butvalidate()panics on failure, so the obligation is met.
Inputs
Tests
Input 2: outline tests/habeas.rs fn[habeas]
- File:
tests/habeas.rs - Selector:
fn[habeas] - Kind:
fn tests/habeas.rs:1–5
// {test}`requirements.integration.self_test`
#[test]
fn habeas() {
habeas::validate();
}
Other sources
Input 1: requirements selection requirements.integration.self_test
requirements.integration.self_test:md/requirements/integration.md:11–13
:::{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`.
:::