rust/tests/ui/test-attrs/decl-macro-test.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
313 B
Rust
Raw Normal View History

2019-08-25 15:03:24 -05:00
// Check that declarative macros can declare tests
// check-pass
// compile-flags: --test
#![feature(decl_macro)]
macro create_test() {
#[test]
fn test() {}
}
macro create_module_test() {
mod x {
#[test]
fn test() {}
}
}
create_test!();
create_test!();
create_module_test!();