-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an issue with sailcov on 1-case matches
A match with a single case (or a let statement) would generate a coverage point that would never be reached.
- Loading branch information
Showing
3 changed files
with
41 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>let_single_branch</title></head> | ||
<body> | ||
<h1>let_single_branch.sail (3/4) 75%</h1> | ||
<code style="display: block"> | ||
default Order dec<br> | ||
$include <prelude.sail><br> | ||
<br> | ||
register R : bool = true<br> | ||
val main : unit -> unit<br> | ||
<br> | ||
function main() = <span style="background-color: hsl(120, 85%, 80%)">{<br> | ||
let (x, y) = (R, R);<br> | ||
<span style="background-color: hsl(120, 85%, 75%)">if x then <span style="background-color: hsl(120, 85%, 70%)">{<br> | ||
print_endline("A")<br> | ||
}</span> else <span style="background-color: hsl(0, 85%, 80%)">{<br> | ||
print_endline("B")<br> | ||
}</span></span><br> | ||
}</span><br> | ||
</code> | ||
</body> | ||
</html> |
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 @@ | ||
default Order dec | ||
$include <prelude.sail> | ||
|
||
register R : bool = true | ||
val main : unit -> unit | ||
|
||
function main() = { | ||
let (x, y) = (R, R); | ||
if x then { | ||
print_endline("A") | ||
} else { | ||
print_endline("B") | ||
} | ||
} |