Skip to content

Commit ac15df9

Browse files
committed
Update tests
1 parent bd23a47 commit ac15df9

77 files changed

Lines changed: 193 additions & 191 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tests/unit/out/refcount/assign_as_value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fn main_0() -> i32 {
3333
(*out.borrow())
3434
}) as i32);
3535
match __match_cond {
36-
v if v == ('x' as i32) => {
36+
__v if __v == ('x' as i32) => {
3737
assert!((1 != 0));
3838
break 'switch;
3939
}

tests/unit/out/refcount/enum_int_interop.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,16 @@ pub fn classify_option_5(option: i32) -> i32 {
116116
'switch: {
117117
let __match_cond = (*option.borrow());
118118
match __match_cond {
119-
v if v == (Option::OPT_NONE as i32) => {
119+
__v if __v == (Option::OPT_NONE as i32) => {
120120
return -1_i32;
121121
}
122-
v if v == (Option::OPT_A as i32) => {
122+
__v if __v == (Option::OPT_A as i32) => {
123123
return 1;
124124
}
125-
v if v == (Option::OPT_B as i32) => {
125+
__v if __v == (Option::OPT_B as i32) => {
126126
return 2;
127127
}
128-
v if v == (Option::OPT_C as i32) => {
128+
__v if __v == (Option::OPT_C as i32) => {
129129
return 3;
130130
}
131131
_ => {
@@ -153,13 +153,13 @@ fn main_0() -> i32 {
153153
'switch: {
154154
let __match_cond = ((*c.borrow()) as i32);
155155
match __match_cond {
156-
v if v == 0 => {
156+
__v if __v == 0 => {
157157
break 'switch;
158158
}
159-
v if v == 1 => {
159+
__v if __v == 1 => {
160160
return 1;
161161
}
162-
v if v == 2 => {
162+
__v if __v == 2 => {
163163
return 2;
164164
}
165165
_ => {
@@ -215,13 +215,13 @@ fn main_0() -> i32 {
215215
'switch: {
216216
let __match_cond = ((*t.borrow()) as i32);
217217
match __match_cond {
218-
v if v == (Tag::TAG_ZERO as i32) => {
218+
__v if __v == (Tag::TAG_ZERO as i32) => {
219219
return 90;
220220
}
221-
v if v == 1 => {
221+
__v if __v == 1 => {
222222
return 91;
223223
}
224-
v if v == 2 => {
224+
__v if __v == 2 => {
225225
break 'switch;
226226
}
227227
_ => {}

tests/unit/out/refcount/enum_int_interop_c.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,16 @@ pub fn classify_option_5(option: i32) -> i32 {
106106
'switch: {
107107
let __match_cond = (*option.borrow());
108108
match __match_cond {
109-
v if v == (Option::OPT_NONE as i32) => {
109+
__v if __v == (Option::OPT_NONE as i32) => {
110110
return -1_i32;
111111
}
112-
v if v == (Option::OPT_A as i32) => {
112+
__v if __v == (Option::OPT_A as i32) => {
113113
return 1;
114114
}
115-
v if v == (Option::OPT_B as i32) => {
115+
__v if __v == (Option::OPT_B as i32) => {
116116
return 2;
117117
}
118-
v if v == (Option::OPT_C as i32) => {
118+
__v if __v == (Option::OPT_C as i32) => {
119119
return 3;
120120
}
121121
_ => {
@@ -143,13 +143,13 @@ fn main_0() -> i32 {
143143
'switch: {
144144
let __match_cond = ((*c.borrow()) as u32);
145145
match __match_cond {
146-
v if v == (0 as u32) => {
146+
__v if __v == (0 as u32) => {
147147
break 'switch;
148148
}
149-
v if v == (1 as u32) => {
149+
__v if __v == (1 as u32) => {
150150
return 1;
151151
}
152-
v if v == (2 as u32) => {
152+
__v if __v == (2 as u32) => {
153153
return 2;
154154
}
155155
_ => {
@@ -209,13 +209,13 @@ fn main_0() -> i32 {
209209
'switch: {
210210
let __match_cond = ((*t.borrow()) as u32);
211211
match __match_cond {
212-
v if v == ((Tag_enum::TAG_ZERO as i32) as u32) => {
212+
__v if __v == ((Tag_enum::TAG_ZERO as i32) as u32) => {
213213
return 90;
214214
}
215-
v if v == (1 as u32) => {
215+
__v if __v == (1 as u32) => {
216216
return 91;
217217
}
218-
v if v == (2 as u32) => {
218+
__v if __v == (2 as u32) => {
219219
break 'switch;
220220
}
221221
_ => {}

tests/unit/out/refcount/goto_cleanup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub fn from_switch_2(n: i32) -> i32 {
5656
'switch: {
5757
let __match_cond = (*n.borrow());
5858
match __match_cond {
59-
v if v == 1 => {
59+
__v if __v == 1 => {
6060
(*ret.borrow_mut()) = 10;
6161
goto!('out);
6262
}

tests/unit/out/refcount/goto_switch_fallthrough.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ pub fn sm_0(n: i32) -> i32 {
1313
'__entry: {
1414
*ret.borrow_mut() = 0;
1515
switch!(match (*n.borrow()) {
16-
v if v == 0 => {
16+
__v if __v == 0 => {
1717
(*ret.borrow_mut()) += 1;
1818
}
19-
v if v == 1 => {
19+
__v if __v == 1 => {
2020
(*ret.borrow_mut()) += 10;
2121
goto!('out);
2222
}

tests/unit/out/refcount/switch_basic.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,19 @@ use std::rc::{Rc, Weak};
99
pub fn basic_0(x: i32) -> i32 {
1010
let x: Value<i32> = Rc::new(RefCell::new(x));
1111
let r: Value<i32> = Rc::new(RefCell::new(0));
12+
let v: Value<i32> = Rc::new(RefCell::new(0));
1213
'switch: {
1314
let __match_cond = (*x.borrow());
1415
match __match_cond {
15-
v if v == 0 => {
16+
__v if __v == 0 => {
1617
(*r.borrow_mut()) = 10;
1718
break 'switch;
1819
}
19-
v if v == 1 => {
20+
__v if __v == 1 => {
2021
(*r.borrow_mut()) = 20;
2122
break 'switch;
2223
}
23-
v if v == 2 => {
24+
__v if __v == 2 => {
2425
(*r.borrow_mut()) = 30;
2526
break 'switch;
2627
}

tests/unit/out/refcount/switch_borrow_in_condition_and_in_body.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::rc::{Rc, Weak};
99
pub fn borrow_in_condition_and_in_body_0(x: i32) -> i32 {
1010
let x: Value<i32> = Rc::new(RefCell::new(x));
1111
switch!(match (*x.borrow()) {
12-
v if v == 0 => {}
12+
__v if __v == 0 => {}
1313
_ => {
1414
return ((*x.borrow()) + 1);
1515
}

tests/unit/out/refcount/switch_case_then_default.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub fn case_then_default_0(x: i32) -> i32 {
1212
'switch: {
1313
let __match_cond = (*x.borrow());
1414
match __match_cond {
15-
v if v == 2 => {
15+
__v if __v == 2 => {
1616
(*r.borrow_mut()) = 20;
1717
break 'switch;
1818
}

tests/unit/out/refcount/switch_cases_and_default_stacked.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub fn cases_and_default_stacked_0(x: i32) -> i32 {
1212
'switch: {
1313
let __match_cond = (*x.borrow());
1414
match __match_cond {
15-
v if v == 3 => {
15+
__v if __v == 3 => {
1616
(*r.borrow_mut()) = 3;
1717
break 'switch;
1818
}

tests/unit/out/refcount/switch_char.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ pub fn switch_char_0(c: u8) -> i32 {
1111
'switch: {
1212
let __match_cond = ((*c.borrow()) as i32);
1313
match __match_cond {
14-
v if v == (('a' as u8) as i32) => {
14+
__v if __v == (('a' as u8) as i32) => {
1515
return 1;
1616
}
17-
v if v == (('b' as u8) as i32) => {
17+
__v if __v == (('b' as u8) as i32) => {
1818
return 2;
1919
}
20-
v if v == (('\n' as u8) as i32) => {
20+
__v if __v == (('\n' as u8) as i32) => {
2121
return 3;
2222
}
23-
v if v == (('\0' as u8) as i32) => {
23+
__v if __v == (('\0' as u8) as i32) => {
2424
return 4;
2525
}
2626
_ => {

0 commit comments

Comments
 (0)