Skip to content

Commit e6a66fd

Browse files
committed
Update tests
1 parent 77a9bb7 commit e6a66fd

6 files changed

Lines changed: 16 additions & 18 deletions

File tree

tests/unit/out/refcount/switch_default_first.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ pub fn default_first_0(x: i32) -> i32 {
1212
'switch: {
1313
let __match_cond = (*x.borrow());
1414
match __match_cond {
15-
_ => {
16-
(*r.borrow_mut()) = 7;
17-
break 'switch;
18-
}
1915
v if v == 1 => {
2016
(*r.borrow_mut()) = 1;
2117
break 'switch;
@@ -24,6 +20,10 @@ pub fn default_first_0(x: i32) -> i32 {
2420
(*r.borrow_mut()) = 2;
2521
break 'switch;
2622
}
23+
_ => {
24+
(*r.borrow_mut()) = 7;
25+
break 'switch;
26+
}
2727
}
2828
};
2929
return (*r.borrow());

tests/unit/out/refcount/switch_default_middle.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ pub fn default_middle_0(x: i32) -> i32 {
1616
(*r.borrow_mut()) = 1;
1717
break 'switch;
1818
}
19-
_ => {
20-
(*r.borrow_mut()) = 99;
21-
break 'switch;
22-
}
2319
v if v == 2 => {
2420
(*r.borrow_mut()) = 2;
2521
break 'switch;
2622
}
23+
_ => {
24+
(*r.borrow_mut()) = 99;
25+
break 'switch;
26+
}
2727
}
2828
};
2929
return (*r.borrow());

tests/unit/out/unsafe/switch_default_first.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ pub unsafe fn default_first_0(mut x: i32) -> i32 {
1111
'switch: {
1212
let __match_cond = x;
1313
match __match_cond {
14-
_ => {
15-
r = 7;
16-
break 'switch;
17-
}
1814
v if v == 1 => {
1915
r = 1;
2016
break 'switch;
@@ -23,6 +19,10 @@ pub unsafe fn default_first_0(mut x: i32) -> i32 {
2319
r = 2;
2420
break 'switch;
2521
}
22+
_ => {
23+
r = 7;
24+
break 'switch;
25+
}
2626
}
2727
};
2828
return r;

tests/unit/out/unsafe/switch_default_middle.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ pub unsafe fn default_middle_0(mut x: i32) -> i32 {
1515
r = 1;
1616
break 'switch;
1717
}
18-
_ => {
19-
r = 99;
20-
break 'switch;
21-
}
2218
v if v == 2 => {
2319
r = 2;
2420
break 'switch;
2521
}
22+
_ => {
23+
r = 99;
24+
break 'switch;
25+
}
2626
}
2727
};
2828
return r;

tests/unit/switch_default_first.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 default_first(int x) {

tests/unit/switch_default_middle.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 default_middle(int x) {

0 commit comments

Comments
 (0)