Struct docmatic::Assert
[−]
[src]
pub struct Assert(_);
A specialized process builder managing a rustdoc
test session.
Example
The following code will test the crate README with the docmatic
configuration set and a default library path:
extern crate docmatic; use std::default::Default; fn test_readme() { docmatic::Assert::default() .cfg("docmatic") .test_file("README.md") }
Methods
impl Assert
[src]
pub fn new() -> Self
[src]
Construct a new Assert
with no flags set.
Will likely fail if you don't provide at least one library path
containing the tested crate. Instead, you should probably use
Assert::default
pub fn library_path<S>(&mut self, path: S) -> &mut Self where
S: AsRef<OsStr>,
[src]
S: AsRef<OsStr>,
Add a path to the library paths passed to rustdoc
.
pub fn cfg<S>(&mut self, cfg: S) -> &mut Self where
S: AsRef<OsStr>,
[src]
S: AsRef<OsStr>,
Add a cfg to the configuration passed to rustdoc
.
pub fn test_file<P>(&mut self, path: P) where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Test the given file, and panics on failure.