|
1 | 1 | // only-cdb
|
2 | 2 | // compile-flags:-g
|
3 | 3 |
|
4 |
| -// Tests the visualizations for `NonZero{I,U}{8,16,32,64,128,size}` and `Wrapping<T>` in |
5 |
| -// `libcore.natvis`. |
| 4 | +// Tests the visualizations for `NonZero{I,U}{8,16,32,64,128,size}`, `Wrapping<T>` and |
| 5 | +// `Atomic{Bool,I8,I16,I32,I64,Isize,U8,U16,U32,U64,Usize}` located in `libcore.natvis`. |
6 | 6 |
|
7 | 7 | // === CDB TESTS ==================================================================================
|
8 | 8 | // cdb-command: g
|
|
105 | 105 | // cdb-check:w_usize : 0x78 [Type: core::num::wrapping::Wrapping<usize>]
|
106 | 106 | // cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<usize>]
|
107 | 107 |
|
| 108 | +// cdb-command: dx a_bool_t |
| 109 | +// cdb-check:a_bool_t : true [Type: core::sync::atomic::AtomicBool] |
| 110 | +// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicBool] |
| 111 | + |
| 112 | +// cdb-command: dx a_bool_f |
| 113 | +// cdb-check:a_bool_f : false [Type: core::sync::atomic::AtomicBool] |
| 114 | +// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicBool] |
| 115 | + |
| 116 | +// cdb-command: dx a_i8 |
| 117 | +// cdb-check:a_i8 : 2 [Type: core::sync::atomic::AtomicI8] |
| 118 | +// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicI8] |
| 119 | + |
| 120 | +// cdb-command: dx a_i16 |
| 121 | +// cdb-check:a_i16 : 4 [Type: core::sync::atomic::AtomicI16] |
| 122 | +// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicI16] |
| 123 | + |
| 124 | +// cdb-command: dx a_i32 |
| 125 | +// cdb-check:a_i32 : 8 [Type: core::sync::atomic::AtomicI32] |
| 126 | +// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicI32] |
| 127 | + |
| 128 | +// cdb-command: dx a_i64 |
| 129 | +// cdb-check:a_i64 : 16 [Type: core::sync::atomic::AtomicI64] |
| 130 | +// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicI64] |
| 131 | + |
| 132 | +// cdb-command: dx a_isize |
| 133 | +// cdb-check:a_isize : 32 [Type: core::sync::atomic::AtomicIsize] |
| 134 | +// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicIsize] |
| 135 | + |
| 136 | +// cdb-command: dx a_u8 |
| 137 | +// cdb-check:a_u8 : 0x40 [Type: core::sync::atomic::AtomicU8] |
| 138 | +// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicU8] |
| 139 | + |
| 140 | +// cdb-command: dx a_u16 |
| 141 | +// cdb-check:a_u16 : 0x80 [Type: core::sync::atomic::AtomicU16] |
| 142 | +// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicU16] |
| 143 | + |
| 144 | +// cdb-command: dx a_u32 |
| 145 | +// cdb-check:a_u32 : 0x100 [Type: core::sync::atomic::AtomicU32] |
| 146 | +// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicU32] |
| 147 | + |
| 148 | +// cdb-command: dx a_u64 |
| 149 | +// cdb-check:a_u64 : 0x200 [Type: core::sync::atomic::AtomicU64] |
| 150 | +// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicU64] |
| 151 | + |
| 152 | +// cdb-command: dx a_usize |
| 153 | +// cdb-check:a_usize : 0x400 [Type: core::sync::atomic::AtomicUsize] |
| 154 | +// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicUsize] |
| 155 | + |
108 | 156 | use std::num::*;
|
| 157 | +use std::sync::atomic::*; |
109 | 158 |
|
110 | 159 | fn main() {
|
111 | 160 | let nz_i8 = NonZeroI8::new(11).unwrap();
|
@@ -136,6 +185,21 @@ fn main() {
|
136 | 185 | let w_u128 = Wrapping(110u128);
|
137 | 186 | let w_usize = Wrapping(120usize);
|
138 | 187 |
|
| 188 | + let a_bool_t = AtomicBool::new(true); |
| 189 | + let a_bool_f = AtomicBool::new(false); |
| 190 | + |
| 191 | + let a_i8 = AtomicI8::new(2); |
| 192 | + let a_i16 = AtomicI16::new(4); |
| 193 | + let a_i32 = AtomicI32::new(8); |
| 194 | + let a_i64 = AtomicI64::new(16); |
| 195 | + let a_isize = AtomicIsize::new(32); |
| 196 | + |
| 197 | + let a_u8 = AtomicU8::new(64); |
| 198 | + let a_u16 = AtomicU16::new(128); |
| 199 | + let a_u32 = AtomicU32::new(256); |
| 200 | + let a_u64 = AtomicU64::new(512); |
| 201 | + let a_usize = AtomicUsize::new(1024); |
| 202 | + |
139 | 203 | zzz(); // #break
|
140 | 204 | }
|
141 | 205 |
|
|
0 commit comments