Struct testanything::tap_writer::TapWriter [−][src]
pub struct TapWriter { pub name: String, }
A named TAP stream writer. This will print directly to STDOUT as you call methods. No waiting. See examples/stream.rs for usage.
Fields
name: String
TAP stream name
Methods
impl TapWriter
[src]
impl TapWriter
pub fn new(name: &str) -> TapWriter
[src]
pub fn new(name: &str) -> TapWriter
Make me a new one from a name. Don't leave the name blank as it improves clarity.
pub fn plan(&self, start: i32, finish: i32)
[src]
pub fn plan(&self, start: i32, finish: i32)
Print out the plan like "1..5". If you don't know the plan ahead of time, it can come at the very end.
pub fn name(&self)
[src]
pub fn name(&self)
Print the suite name as a diagnostic line. Surrounded by blank diagnostic lines because pretty.
pub fn ok(&self, test_number: i32, message: &str)
[src]
pub fn ok(&self, test_number: i32, message: &str)
Emit a passing test line.
pub fn not_ok(&self, test_number: i32, message: &str)
[src]
pub fn not_ok(&self, test_number: i32, message: &str)
Emit a failing test line.
pub fn diagnostic(&self, message: &str)
[src]
pub fn diagnostic(&self, message: &str)
Emit a diagnostic message. Prefaced with a #.
pub fn bail_out(&self)
[src]
pub fn bail_out(&self)
Emergency stop! This should be the last thing in the TAP stream. Nothing may come after it.
pub fn bail_out_with_message(&self, message: &str)
[src]
pub fn bail_out_with_message(&self, message: &str)
In case you want to bail out with a message. Please use this instead of plain bail_out
.