diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-03-04 10:56:11 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-04 10:56:11 +0000 |
commit | 79d05aacd82dc38f491a87c2f61dc38e8da6e81c (patch) | |
tree | 4dce12051c938fbb5a69c23b5dedea6b0a707aa5 /crates/test_utils/src | |
parent | 437329d3f5b7bb5b703b93c75a97d349eb77d6c7 (diff) | |
parent | 5095573139359ecf4560c66d13278c4122a4ca8b (diff) |
Merge #3438
3438: Remove stray FIXME r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/test_utils/src')
-rw-r--r-- | crates/test_utils/src/marks.rs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/crates/test_utils/src/marks.rs b/crates/test_utils/src/marks.rs index f8fabfaff..c3185e860 100644 --- a/crates/test_utils/src/marks.rs +++ b/crates/test_utils/src/marks.rs | |||
@@ -30,6 +30,12 @@ use std::sync::atomic::{AtomicUsize, Ordering}; | |||
30 | 30 | ||
31 | #[macro_export] | 31 | #[macro_export] |
32 | macro_rules! tested_by { | 32 | macro_rules! tested_by { |
33 | ($ident:ident; force) => {{ | ||
34 | { | ||
35 | // sic! use call-site crate | ||
36 | crate::marks::$ident.fetch_add(1, std::sync::atomic::Ordering::SeqCst); | ||
37 | } | ||
38 | }}; | ||
33 | ($ident:ident) => {{ | 39 | ($ident:ident) => {{ |
34 | #[cfg(test)] | 40 | #[cfg(test)] |
35 | { | 41 | { |
@@ -41,9 +47,12 @@ macro_rules! tested_by { | |||
41 | 47 | ||
42 | #[macro_export] | 48 | #[macro_export] |
43 | macro_rules! covers { | 49 | macro_rules! covers { |
50 | // sic! use call-site crate | ||
44 | ($ident:ident) => { | 51 | ($ident:ident) => { |
45 | // sic! use call-site crate | 52 | $crate::covers!(crate::$ident) |
46 | let _checker = $crate::marks::MarkChecker::new(&crate::marks::$ident); | 53 | }; |
54 | ($krate:ident :: $ident:ident) => { | ||
55 | let _checker = $crate::marks::MarkChecker::new(&$krate::marks::$ident); | ||
47 | }; | 56 | }; |
48 | } | 57 | } |
49 | 58 | ||
@@ -52,7 +61,7 @@ macro_rules! marks { | |||
52 | ($($ident:ident)*) => { | 61 | ($($ident:ident)*) => { |
53 | $( | 62 | $( |
54 | #[allow(bad_style)] | 63 | #[allow(bad_style)] |
55 | pub(crate) static $ident: std::sync::atomic::AtomicUsize = | 64 | pub static $ident: std::sync::atomic::AtomicUsize = |
56 | std::sync::atomic::AtomicUsize::new(0); | 65 | std::sync::atomic::AtomicUsize::new(0); |
57 | )* | 66 | )* |
58 | }; | 67 | }; |