Skip to content

Instantly share code, notes, and snippets.

@bstrie
Created March 21, 2015 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bstrie/9655b6d42454b306fe9e to your computer and use it in GitHub Desktop.
Save bstrie/9655b6d42454b306fe9e to your computer and use it in GitHub Desktop.
[package]
name="bob"
version="0.0.1"
[lib]
name="bob"
path="lib.rs"
/// ```rust
/// #[macro_use] extern crate bob;
/// fn main() {
/// foo!();
/// }
/// ```
#[macro_export]
macro_rules! foo {
() => ();
}
$ cargo test
Running target/debug/bob-8ff8880c05df13de
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
Doc-tests bob
running 1 test
test foo!_0 ... FAILED
failures:
---- foo!_0 stdout ----
<anon>:1:1: 1:1 error: unexpected token: `<eof>`
<anon>:1
^
thread 'foo!_0' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnosti
c.rs:92
failures:
foo!_0
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured
thread '<unnamed>' panicked at 'Some tests failed', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libtest
/lib.rs:260
thread '<main>' panicked at 'child thread None panicked', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/l
ibstd/thread.rs:661
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment