]> git.lizzy.rs Git - rust.git/blob - src/test/ui/test-attrs/decl-macro-test.rs
Rollup merge of #102574 - aDotInTheVoid:const_collections_with_hasher, r=oli-obk...
[rust.git] / src / test / ui / test-attrs / decl-macro-test.rs
1 // Check that declarative macros can declare tests
2
3 // check-pass
4 // compile-flags: --test
5
6 #![feature(decl_macro)]
7
8 macro create_test() {
9     #[test]
10     fn test() {}
11 }
12
13 macro create_module_test() {
14     mod x {
15         #[test]
16         fn test() {}
17     }
18 }
19
20 create_test!();
21 create_test!();
22 create_module_test!();