diff options
Diffstat (limited to '')
-rw-r--r-- | tests/run-coverage/loops_branches.coverage | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/tests/run-coverage/loops_branches.coverage b/tests/run-coverage/loops_branches.coverage index b7ad79a24..148a22377 100644 --- a/tests/run-coverage/loops_branches.coverage +++ b/tests/run-coverage/loops_branches.coverage @@ -1,68 +1,68 @@ - 1| |#![allow(unused_assignments, unused_variables, while_true)] - 2| | - 3| |// This test confirms that (1) unexecuted infinite loops are handled correctly by the - 4| |// InstrumentCoverage MIR pass; and (2) Counter Expressions that subtract from zero can be dropped. - 5| | - 6| |struct DebugTest; - 7| | - 8| |impl std::fmt::Debug for DebugTest { - 9| 1| fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - 10| 1| if true { - 11| 1| if false { - 12| 0| while true { - 13| 0| } - 14| 1| } - 15| 1| write!(f, "cool")?; + LL| |#![allow(unused_assignments, unused_variables, while_true)] + LL| | + LL| |// This test confirms that (1) unexecuted infinite loops are handled correctly by the + LL| |// InstrumentCoverage MIR pass; and (2) Counter Expressions that subtract from zero can be dropped. + LL| | + LL| |struct DebugTest; + LL| | + LL| |impl std::fmt::Debug for DebugTest { + LL| 1| fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + LL| 1| if true { + LL| 1| if false { + LL| 0| while true { + LL| 0| } + LL| 1| } + LL| 1| write!(f, "cool")?; ^0 - 16| 0| } else { - 17| 0| } - 18| | - 19| 11| for i in 0..10 { + LL| 0| } else { + LL| 0| } + LL| | + LL| 11| for i in 0..10 { ^10 - 20| 10| if true { - 21| 10| if false { - 22| 0| while true {} - 23| 10| } - 24| 10| write!(f, "cool")?; + LL| 10| if true { + LL| 10| if false { + LL| 0| while true {} + LL| 10| } + LL| 10| write!(f, "cool")?; ^0 - 25| 0| } else { - 26| 0| } - 27| | } - 28| 1| Ok(()) - 29| 1| } - 30| |} - 31| | - 32| |struct DisplayTest; - 33| | - 34| |impl std::fmt::Display for DisplayTest { - 35| 1| fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - 36| 1| if false { - 37| 0| } else { - 38| 1| if false { - 39| 0| while true {} - 40| 1| } - 41| 1| write!(f, "cool")?; + LL| 0| } else { + LL| 0| } + LL| | } + LL| 1| Ok(()) + LL| 1| } + LL| |} + LL| | + LL| |struct DisplayTest; + LL| | + LL| |impl std::fmt::Display for DisplayTest { + LL| 1| fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + LL| 1| if false { + LL| 0| } else { + LL| 1| if false { + LL| 0| while true {} + LL| 1| } + LL| 1| write!(f, "cool")?; ^0 - 42| | } - 43| 11| for i in 0..10 { + LL| | } + LL| 11| for i in 0..10 { ^10 - 44| 10| if false { - 45| 0| } else { - 46| 10| if false { - 47| 0| while true {} - 48| 10| } - 49| 10| write!(f, "cool")?; + LL| 10| if false { + LL| 0| } else { + LL| 10| if false { + LL| 0| while true {} + LL| 10| } + LL| 10| write!(f, "cool")?; ^0 - 50| | } - 51| | } - 52| 1| Ok(()) - 53| 1| } - 54| |} - 55| | - 56| 1|fn main() { - 57| 1| let debug_test = DebugTest; - 58| 1| println!("{:?}", debug_test); - 59| 1| let display_test = DisplayTest; - 60| 1| println!("{}", display_test); - 61| 1|} + LL| | } + LL| | } + LL| 1| Ok(()) + LL| 1| } + LL| |} + LL| | + LL| 1|fn main() { + LL| 1| let debug_test = DebugTest; + LL| 1| println!("{:?}", debug_test); + LL| 1| let display_test = DisplayTest; + LL| 1| println!("{}", display_test); + LL| 1|} |