Browse Source

Add basic success example doctest

pull/9/head
Ian Chamberlain 1 year ago
parent
commit
efe858d54b
No known key found for this signature in database
GPG Key ID: AE5484D09405AA60
  1. 10
      test-runner/src/lib.rs

10
test-runner/src/lib.rs

@ -61,6 +61,16 @@ pub fn run_socket(tests: &[&TestDescAndFn]) {
/// ///
/// # Examples /// # Examples
/// ///
/// ## Basic usage
///
#[cfg_attr(not(doctest), doc = "````")]
/// ```
/// test_runner::doctest! {
/// assert_eq!(2 + 2, 4);
/// }
/// ```
#[cfg_attr(not(doctest), doc = "````")]
///
/// ## Custom runner /// ## Custom runner
/// ///
#[cfg_attr(not(doctest), doc = "````")] #[cfg_attr(not(doctest), doc = "````")]

Loading…
Cancel
Save