Skip to content

Commit 3e070fa

Browse files
committed
Add a test for defmac crate
1 parent 12dcc28 commit 3e070fa

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/defmac.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
use defmac::defmac; // 2018 edition style
2+
3+
#[test]
4+
fn incr() {
5+
let mut acc = 0;
6+
defmac!(incr => acc += 1);
7+
incr!();
8+
assert_eq!(acc, 1);
9+
}

0 commit comments

Comments
 (0)