aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2019-05-01 16:53:01 +0200
committerAndrew Gallant <jamslam@gmail.com>2019-05-01 10:53:01 -0400
commit43c437747c91d17bfc866f0a03a107e8430e6c70 (patch)
treeb85880621c29bf1e6ebbb9d6cfff9b82017a312d /src
parentc25f0f9db85c3de547053db8a36e208930c836e0 (diff)
downloadbyteorder-43c437747c91d17bfc866f0a03a107e8430e6c70.tar.gz
test: check examples in README
PR #146
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 0274d74..2ce9603 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -67,6 +67,13 @@ This crate can also be used without the standard library.
#[cfg(feature = "std")]
extern crate core;
+#[cfg(test)]
+#[macro_use]
+extern crate doc_comment;
+
+#[cfg(test)]
+doctest!("../README.md");
+
use core::fmt::Debug;
use core::hash::Hash;
use core::ptr::copy_nonoverlapping;