Skip to main content

summary

Function summary 

Source
pub fn summary(part: Part, plan: &Plan<'_>, names: &[String]) -> String
Expand description

The line that just test-part prints before it runs the tests of plan, of the tests names.

use hygiene::part::{summary, Plan, Part};

let names = ["a".to_owned(), "b".to_owned(), "x.rs - f (line 1)".to_owned()];
let part = Part { index: 1, count: 2 };
let plan = Plan { tests: vec!["a"], doc: 1 };
assert_eq!(
    summary(part, &plan, &names),
    "just test-part 1/2 runs 1 of 2 tests, and the 1 doc tests"
);
let part = Part { index: 2, count: 2 };
let plan = Plan { tests: vec!["b"], doc: 0 };
assert_eq!(summary(part, &plan, &names), "just test-part 2/2 runs 1 of 2 tests");