Skip to content

Commit d59191b

Browse files
committed
Update tests
1 parent c2336d9 commit d59191b

2 files changed

Lines changed: 0 additions & 42 deletions

File tree

tests/unit/out/refcount/default_in_statics.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -98,25 +98,6 @@ impl Default for Foo {
9898
}
9999
}
100100
impl ByteRepr for Foo {}
101-
thread_local!(
102-
pub static static_p1: Value<Ptr<i32>> = Rc::new(RefCell::new(Ptr::<i32>::null()));
103-
);
104-
thread_local!(
105-
pub static static_p2: Value<Ptr<i32>> = Rc::new(RefCell::new(Ptr::<i32>::null()));
106-
);
107-
thread_local!(
108-
pub static static_cp: Value<Ptr<u8>> = Rc::new(RefCell::new(Ptr::<u8>::null()));
109-
);
110-
thread_local!(
111-
pub static static_arr: Value<Box<[Ptr<i32>]>> = Rc::new(RefCell::new(
112-
(0..4)
113-
.map(|_| Ptr::<i32>::null())
114-
.collect::<Box<[Ptr<i32>]>>(),
115-
));
116-
);
117-
thread_local!(
118-
pub static static_pp: Value<Ptr<Ptr<i32>>> = Rc::new(RefCell::new(Ptr::<Ptr<i32>>::null()));
119-
);
120101
thread_local!(
121102
pub static static_fn: Value<FnPtr<fn(i32) -> i32>> = Rc::new(RefCell::new(FnPtr::null()));
122103
);
@@ -174,15 +155,6 @@ pub fn main() {
174155
std::process::exit(main_0());
175156
}
176157
fn main_0() -> i32 {
177-
assert!((*static_p1.with(Value::clone).borrow()).is_null());
178-
assert!((*static_p2.with(Value::clone).borrow()).is_null());
179-
assert!((*static_cp.with(Value::clone).borrow()).is_null());
180-
let i: Value<i32> = Rc::new(RefCell::new(0));
181-
'loop_: while ((*i.borrow()) < 4) {
182-
assert!(((*static_arr.with(Value::clone).borrow())[(*i.borrow()) as usize]).is_null());
183-
(*i.borrow_mut()).prefix_inc();
184-
}
185-
assert!((*static_pp.with(Value::clone).borrow()).is_null());
186158
assert!((*static_fn.with(Value::clone).borrow()).is_null());
187159
assert!((*(*static_outer.with(Value::clone).borrow()).p1.borrow()).is_null());
188160
assert!((*(*static_outer.with(Value::clone).borrow()).p2.borrow()).is_null());

tests/unit/out/unsafe/default_in_statics.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ impl Default for Foo {
5858
}
5959
}
6060
}
61-
pub static mut static_p1: *mut i32 = std::ptr::null_mut();
62-
pub static mut static_p2: *const i32 = std::ptr::null();
63-
pub static mut static_cp: *const u8 = std::ptr::null();
64-
pub static mut static_arr: [*mut i32; 4] = [std::ptr::null_mut(); 4];
65-
pub static mut static_pp: *mut *mut i32 = std::ptr::null_mut();
6661
pub static mut static_fn: Option<unsafe fn(i32) -> i32> = None;
6762
pub static mut static_outer: Outer = Outer {
6863
p1: std::ptr::null_mut(),
@@ -131,15 +126,6 @@ pub fn main() {
131126
}
132127
}
133128
unsafe fn main_0() -> i32 {
134-
assert!((static_p1).is_null());
135-
assert!((static_p2).is_null());
136-
assert!((static_cp).is_null());
137-
let mut i: i32 = 0;
138-
'loop_: while ((i) < (4)) {
139-
assert!((static_arr[(i) as usize]).is_null());
140-
i.prefix_inc();
141-
}
142-
assert!((static_pp).is_null());
143129
assert!((static_fn).is_none());
144130
assert!((static_outer.p1).is_null());
145131
assert!((static_outer.p2).is_null());

0 commit comments

Comments
 (0)