Migrate most of the existing coverage tests over to run-coverage
This commit is contained in:
parent
22e119bbac
commit
e0625b4586
81 changed files with 24 additions and 20 deletions
26
tests/run-coverage/nested_loops.coverage
Normal file
26
tests/run-coverage/nested_loops.coverage
Normal file
|
@ -0,0 +1,26 @@
|
|||
1| 1|fn main() {
|
||||
2| 1| let is_true = std::env::args().len() == 1;
|
||||
3| 1| let mut countdown = 10;
|
||||
4| |
|
||||
5| 1| 'outer: while countdown > 0 {
|
||||
6| 1| let mut a = 100;
|
||||
7| 1| let mut b = 100;
|
||||
8| 3| for _ in 0..50 {
|
||||
9| 3| if a < 30 {
|
||||
10| 0| break;
|
||||
11| 3| }
|
||||
12| 3| a -= 5;
|
||||
13| 3| b -= 5;
|
||||
14| 3| if b < 90 {
|
||||
15| 1| a -= 10;
|
||||
16| 1| if is_true {
|
||||
17| 1| break 'outer;
|
||||
18| 0| } else {
|
||||
19| 0| a -= 2;
|
||||
20| 0| }
|
||||
21| 2| }
|
||||
22| | }
|
||||
23| 0| countdown -= 1;
|
||||
24| | }
|
||||
25| 1|}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue