INNER CODE UNIT · Rust
expected_mapping
stjude-rust-labs/sprocket · crates/sprocket-test-types/src/lib.rs:60
fn expected_mapping(field: &Spanned<String>) -> Diagnostic {
Diagnostic::error(format!(
"expected a mapping of values in field `{}`",
field.0.value
))
.with_highlight(convert_yaml_span(field.0.defined.span()))
}
/// Collection of tests for an entire WDL document.
#[derive(Clone, Debug, JsonSchema)]
#[schemars(transparent)]
pub struct DocumentTests {
/// Tasks or Workflows with test definitions.
///
/// Each task or workflow may have one or more test definitions.
pub targets: IndexMap<Spanned<String>, Vec<TestDefinition>>,
}