run_conformance_test

Function run_conformance_test 

Source
pub async fn run_conformance_test<C: Conformance>(
    type_name: &str,
    n_cases: usize,
    conformance_path: &Path,
)
Expand description

Run conformance tests using the Conformance trait.

This function is the generic version that works with any Conformance implementation.

§Behavior

  • If the type is missing from the file, it is automatically added.
  • If the hash differs, the test fails (format changed).
  • When cfg(generate_conformance_tests) is set, regenerates the hash.

§Arguments

  • type_name - The stringified type name (used as the TOML section key)
  • n_cases - Number of test cases to hash together (seeds 0..n_cases)
  • conformance_path - Path to the conformance TOML file

§Panics

Panics if the hash doesn’t match (format changed).