-
Notifications
You must be signed in to change notification settings - Fork 553
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crashes with uneven number of nocov instructions
Fixes #846 We just assume them to go until the end. Test against a full nocov for the file as well as a small mixture.
- Loading branch information
Showing
5 changed files
with
125 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# :nocov: | ||
module SingleNocov | ||
def self.call(arg) | ||
if arg.odd? | ||
:odd | ||
elsif arg == 30 | ||
:mop | ||
elsif arg == 42 | ||
:yay | ||
else | ||
:nay | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module UnevenNocov | ||
def self.call(arg) | ||
# :nocov: | ||
if arg.odd? | ||
:odd | ||
elsif arg == 30 | ||
:mop | ||
# :nocov: | ||
elsif arg == 42 | ||
:yay | ||
# :nocov: | ||
else | ||
:nay | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters