Struct test_runner::GdbRunner
source · pub struct GdbRunner(/* private fields */);
Expand description
Show test output in GDB, using the File I/O Protocol (called HIO in some 3DS homebrew resources). Both stdout and stderr will be printed to the GDB console.
Creating this runner at the beginning of a doctest enables output from failing
tests. Without GdbRunner
, tests will still fail on panic, but they won’t display
anything written to stdout
or stderr
.
The runner should remain in scope for the remainder of the test.
§Examples
```
let _runner = test_runner::GdbRunner::default();
assert_eq!(2 + 2, 4);
```
```should_panic
let _runner = test_runner::GdbRunner::default();
assert_eq!(2 + 2, 5);
```