Skip to content

Commit dab0234

Browse files
committed
Update tests
1 parent 4b5bab8 commit dab0234

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎tests/unit/out/refcount/local_record_template.rs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ pub fn get_0(t: Local) -> i32 {
1010
let t: Value<Local> = Rc::new(RefCell::new(t));
1111
return (*(*t.borrow()).x.borrow());
1212
}
13+
pub fn twice_1(t: Local) -> i32 {
14+
let t: Value<Local> = Rc::new(RefCell::new(t));
15+
return ((*(*t.borrow()).x.borrow()) * 2);
16+
}
1317
pub fn main() {
1418
std::process::exit(main_0());
1519
}
@@ -18,6 +22,7 @@ fn main_0() -> i32 {
1822
x: Rc::new(RefCell::new(7)),
1923
}));
2024
assert!((({ get_0((*l.borrow()).clone(),) }) == 7));
25+
assert!((({ twice_1((*l.borrow()).clone(),) }) == 14));
2126
return 0;
2227
}
2328
#[derive(Default)]

‎tests/unit/out/unsafe/local_record_template.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ use std::rc::Rc;
99
pub unsafe fn get_0(mut t: Local) -> i32 {
1010
return t.x;
1111
}
12+
pub unsafe fn twice_1(mut t: Local) -> i32 {
13+
return ((t.x) * (2));
14+
}
1215
pub fn main() {
1316
unsafe {
1417
std::process::exit(main_0() as i32);
@@ -17,6 +20,7 @@ pub fn main() {
1720
unsafe fn main_0() -> i32 {
1821
let mut l: Local = Local { x: 7 };
1922
assert!(((unsafe { get_0(l,) }) == (7)));
23+
assert!(((unsafe { twice_1(l,) }) == (14)));
2024
return 0;
2125
}
2226
#[repr(C)]

0 commit comments

Comments
 (0)