pub fn parse_test_document<D>(text: &'static str) -> &'static Dwhere
D: NetdocParseable + Sync,Available on crate features
testing only.Expand description
Parse text as document type D, for use in testing
Parses with retain unknown values enabled, iff the corresponding cargo feature is enabled.
Memoises the parsing (so, leaking the parsed document), so that we don’t reparse these documents once for each test case that uses them.
§Panics
Panics if the parsing fails.