From efe858d54ba96cf16a183babdf2e616aa66e8d09 Mon Sep 17 00:00:00 2001 From: Ian Chamberlain Date: Sun, 24 Sep 2023 17:24:54 -0400 Subject: [PATCH] Add basic success example doctest --- test-runner/src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test-runner/src/lib.rs b/test-runner/src/lib.rs index f532134..23b30ce 100644 --- a/test-runner/src/lib.rs +++ b/test-runner/src/lib.rs @@ -61,6 +61,16 @@ pub fn run_socket(tests: &[&TestDescAndFn]) { /// /// # Examples /// +/// ## Basic usage +/// +#[cfg_attr(not(doctest), doc = "````")] +/// ``` +/// test_runner::doctest! { +/// assert_eq!(2 + 2, 4); +/// } +/// ``` +#[cfg_attr(not(doctest), doc = "````")] +/// /// ## Custom runner /// #[cfg_attr(not(doctest), doc = "````")]