forked from SimonKagstrom/kcov
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue SimonKagstrom#42: tests: Add (failing) test for clang coverage
- Loading branch information
1 parent
fd1aac2
commit b13d4e2
Showing
3 changed files
with
53 additions
and
0 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,26 @@ | ||
#include <stdio.h> | ||
|
||
static int fn(int a) | ||
{ | ||
printf("fn %d\n", a); | ||
|
||
a = a + 1; | ||
a = a + 2; | ||
|
||
return a + 3; | ||
} | ||
|
||
int main(int argc, const char *argv[]) | ||
{ | ||
if (argc == 1) { | ||
int out = fn(argc + 1); | ||
|
||
out++; | ||
|
||
return out; | ||
} else { | ||
fn(5); | ||
} | ||
|
||
return 0; | ||
} |
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