Skip to content

Commit

Permalink
Fix format in tests..
Browse files Browse the repository at this point in the history
  • Loading branch information
adpaco-aws committed Aug 14, 2024
1 parent 6eefd6f commit 0262056
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/coverage/unreachable/if-statement/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fn check_number(num: i32) -> &'static str {
if num > 0 {
// The next line is partially covered
if num % 2 == 0 { "Positive and Even" } else { "Positive and Odd" }
} else if num < 0 { // From here on, only the terminator is covered
} else if num < 0 {
"Negative"
} else {
"Zero"
Expand Down
14 changes: 7 additions & 7 deletions tests/coverage/unreachable/variant/expected
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ main.rs (main)\

main.rs (print_direction)\
* 14:1 - 14:36 COVERED\
* 15:11 - 15:14 UNCOVERED\
* 16:26 - 16:47 UNCOVERED\
* 17:28 - 17:51 UNCOVERED\
* 18:28 - 18:51 COVERED\
* 19:34 - 19:63 UNCOVERED\
* 21:14 - 21:45 UNCOVERED\
* 23:1 - 23:2 COVERED
* 16:11 - 16:14 UNCOVERED\
* 17:26 - 17:47 UNCOVERED\
* 18:28 - 18:51 UNCOVERED\
* 19:28 - 19:51 COVERED\
* 20:34 - 20:63 UNCOVERED\
* 22:14 - 22:45 UNCOVERED\
* 24:1 - 24:2 COVERED
3 changes: 2 additions & 1 deletion tests/coverage/unreachable/variant/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ enum Direction {
}

fn print_direction(dir: Direction) {
match dir { // For some reason, `dir`'s span is reported as `UNCOVERED` too
// For some reason, `dir`'s span is reported as `UNCOVERED` too
match dir {
Direction::Up => println!("Going up!"),
Direction::Down => println!("Going down!"),
Direction::Left => println!("Going left!"),
Expand Down

0 comments on commit 0262056

Please sign in to comment.