Practracker: add an integration test.

This test runs practracker with a set of 0 thresholds, to make sure
that it enumerates all its values right.  It tries running with an
empty exceptions file, and with an exceptions file that covers
_some_ of the data, and it makes sure that the outputs are as expected.
This commit is contained in:
Nick Mathewson
2019-07-30 12:07:40 -04:00
parent a79e2c2975
commit 8d3f3e5d30
9 changed files with 126 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
#include "one.h"
#include "two.h"
#incldue "three.h"
# include "four.h"
int
i_am_a_function(void)
{
call();
call();
/* comment
another */
return 3;
}
# include "five.h"
long
another_function(long x,
long y)
{
int abcd;
abcd = x+y;
abcd *= abcd;
/* comment here */
return abcd +
abcd +
abcd;
}
/* And a comment to grow! */
+15
View File
@@ -0,0 +1,15 @@
MOCK_IMPL(int,
foo,(void))
{
// blah1
return 0;
}
MOCK_IMPL(int,
bar,( long z))
{
// blah2
return (int)(z+2);
}
View File
+7
View File
@@ -0,0 +1,7 @@
problem file-size a.c 38
problem include-count a.c 4
problem function-size a.c:i_am_a_function() 9
problem function-size a.c:another_function() 12
problem file-size b.c 15
problem function-size b.c:foo() 4
problem function-size b.c:bar() 5
View File
+3
View File
@@ -0,0 +1,3 @@
problem function-size a.c:i_am_a_function() 9
(warning) problem function-size a.c:another_function() 12
problem function-size b.c:foo() 4
+11
View File
@@ -0,0 +1,11 @@
problem file-size a.c 38
problem include-count a.c 4
# this problem will produce an error
problem function-size a.c:i_am_a_function() 8
# this problem will produce a warning
problem function-size a.c:another_function() 11
problem file-size b.c 15
# This is removed, and so will produce an error.
# problem function-size b.c:foo() 4
problem function-size b.c:bar() 5
+2
View File
@@ -0,0 +1,2 @@
This isn't a C file, so practracker shouldn't care about it.