diff options
Diffstat (limited to 'src/libcoretest')
| -rw-r--r-- | src/libcoretest/atomic.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libcoretest/atomic.rs b/src/libcoretest/atomic.rs index 8e3c7f4595a..c50f18c2352 100644 --- a/src/libcoretest/atomic.rs +++ b/src/libcoretest/atomic.rs @@ -70,13 +70,15 @@ fn int_xor() { assert_eq!(x.load(SeqCst), 0xf731 ^ 0x137f); } -static S_BOOL : AtomicBool = ATOMIC_BOOL_INIT; -static S_INT : AtomicIsize = ATOMIC_ISIZE_INIT; -static S_UINT : AtomicUsize = ATOMIC_USIZE_INIT; +static S_FALSE: AtomicBool = AtomicBool::new(false); +static S_TRUE: AtomicBool = AtomicBool::new(true); +static S_INT: AtomicIsize = AtomicIsize::new(0); +static S_UINT: AtomicUsize = AtomicUsize::new(0); #[test] fn static_init() { - assert!(!S_BOOL.load(SeqCst)); + assert!(!S_FALSE.load(SeqCst)); + assert!(S_TRUE.load(SeqCst)); assert!(S_INT.load(SeqCst) == 0); assert!(S_UINT.load(SeqCst) == 0); } |
