Skip to content

Commit 7bc6f88

Browse files
committed
Update tests
1 parent f6b377f commit 7bc6f88

12 files changed

Lines changed: 12 additions & 16 deletions

tests/unit/out/refcount/switch_for_in_switch_break.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub fn for_in_switch_break_0(n: i32) -> i32 {
1616
let i: Value<i32> = Rc::new(RefCell::new(0));
1717
'loop_: while ((*i.borrow()) < 10) {
1818
if ((*i.borrow()) == 3) {
19-
break 'switch;
19+
break;
2020
}
2121
(*r.borrow_mut()) += (*i.borrow());
2222
(*i.borrow_mut()).prefix_inc();

tests/unit/out/refcount/switch_for_switch_for_break.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub fn for_switch_for_break_0(n: i32) -> i32 {
1818
let j: Value<i32> = Rc::new(RefCell::new(0));
1919
'loop_: while ((*j.borrow()) < 10) {
2020
if ((*j.borrow()) == 2) {
21-
break 'switch;
21+
break;
2222
}
2323
(*r.borrow_mut()) += 1;
2424
(*j.borrow_mut()).prefix_inc();

tests/unit/out/refcount/switch_nested.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ pub fn nested_0(a: i32, b: i32) -> i32 {
3232
}
3333
};
3434
(*r.borrow_mut()) += 1;
35-
break;
35+
break 'switch;
3636
}
3737
v if v == 2 => {
3838
(*r.borrow_mut()) = 2;
39-
break;
39+
break 'switch;
4040
}
4141
_ => {
4242
(*r.borrow_mut()) = -1_i32;
43-
break;
43+
break 'switch;
4444
}
4545
}
4646
};

tests/unit/out/refcount/switch_while_in_switch_break.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub fn while_in_switch_break_0(n: i32) -> i32 {
1616
let i: Value<i32> = Rc::new(RefCell::new(0));
1717
'loop_: while ((*i.borrow()) < 10) {
1818
if ((*i.borrow()) == 4) {
19-
break 'switch;
19+
break;
2020
}
2121
(*r.borrow_mut()) += (*i.borrow());
2222
(*i.borrow_mut()).prefix_inc();

tests/unit/out/unsafe/switch_for_in_switch_break.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub unsafe fn for_in_switch_break_0(mut n: i32) -> i32 {
1515
let mut i: i32 = 0;
1616
'loop_: while ((i) < (10)) {
1717
if ((i) == (3)) {
18-
break 'switch;
18+
break;
1919
}
2020
r += i;
2121
i.prefix_inc();

tests/unit/out/unsafe/switch_for_switch_for_break.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub unsafe fn for_switch_for_break_0(mut n: i32) -> i32 {
1717
let mut j: i32 = 0;
1818
'loop_: while ((j) < (10)) {
1919
if ((j) == (2)) {
20-
break 'switch;
20+
break;
2121
}
2222
r += 1;
2323
j.prefix_inc();

tests/unit/out/unsafe/switch_nested.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ pub unsafe fn nested_0(mut a: i32, mut b: i32) -> i32 {
3030
}
3131
};
3232
r += 1;
33-
break;
33+
break 'switch;
3434
}
3535
v if v == 2 => {
3636
r = 2;
37-
break;
37+
break 'switch;
3838
}
3939
_ => {
4040
r = -1_i32;
41-
break;
41+
break 'switch;
4242
}
4343
}
4444
};

tests/unit/out/unsafe/switch_while_in_switch_break.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub unsafe fn while_in_switch_break_0(mut n: i32) -> i32 {
1515
let mut i: i32 = 0;
1616
'loop_: while ((i) < (10)) {
1717
if ((i) == (4)) {
18-
break 'switch;
18+
break;
1919
}
2020
r += i;
2121
i.prefix_inc();

tests/unit/switch_for_in_switch_break.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// panic
21
#include <cassert>
32

43
int for_in_switch_break(int n) {

tests/unit/switch_for_switch_for_break.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// panic
21
#include <cassert>
32

43
int for_switch_for_break(int n) {

0 commit comments

Comments
 (0)