]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
practracker: Test for bad ".c" includes in the unit tests
authorteor <teor@torproject.org>
Sat, 16 Nov 2019 11:45:52 +0000 (21:45 +1000)
committerNick Mathewson <nickm@torproject.org>
Wed, 4 Dec 2019 17:15:22 +0000 (12:15 -0500)
Part of 32522.

scripts/maint/practracker/testdata/.may_include
scripts/maint/practracker/testdata/a.c
scripts/maint/practracker/testdata/ex0-expected.txt
scripts/maint/practracker/testdata/ex1-overbroad-expected.txt
scripts/maint/practracker/testdata/ex1.txt

index 40bf8155d911a66dac00f11a177b969e4d6d1b76..8542a35807018017a884dd8df95014212a6ea691 100644 (file)
@@ -1,3 +1,4 @@
 !advisory
 
 permitted.h
+ext/good.c
index 1939773f57d3032aec6b59f2a393f8850ef1150c..3c338ab40d57584bae5f1feec2cf39106d57367c 100644 (file)
@@ -5,6 +5,9 @@
 
 # include "permitted.h"
 
+#include "ext/good.c"
+#include "bad.c"
+
 int
 i_am_a_function(void)
 {
index 5f3d9e5aec70deb37fc7c83f114eea0c4fd1bbae..502005edb19f752c2e44b78081204d47dd7cc460 100644 (file)
@@ -1,8 +1,8 @@
-problem file-size a.c 38
-problem include-count a.c 4
+problem file-size a.c 41
+problem include-count a.c 6
 problem function-size a.c:i_am_a_function() 9
 problem function-size a.c:another_function() 12
-problem dependency-violation a.c 3
+problem dependency-violation a.c 4
 problem file-size b.c 15
 problem function-size b.c:foo() 4
 problem function-size b.c:bar() 5
index f69c608f4069390e95bf02b231f728e06c5acfa7..b757202dae4edf7b646573be731244edee40d267 100644 (file)
@@ -1,2 +1,2 @@
-problem file-size a.c 40 -> 38
+problem file-size a.c 45 -> 41
 problem file-size z.c 100 -> 0
index c698005d07f3ccd47ee65fdfca221f94382c0f37..af8de0329104fd11d432e3352e21e7fe8cb8dbbf 100644 (file)
@@ -1,6 +1,6 @@
 
-problem file-size a.c 40
-problem include-count a.c 4
+problem file-size a.c 45
+problem include-count a.c 6
 # this problem will produce an error
 problem function-size a.c:i_am_a_function() 8
 # this problem will produce a warning
@@ -12,7 +12,7 @@ problem file-size b.c 15
 problem file-size z.c 100
 
 problem function-size b.c:bar() 5
-problem dependency-violation a.c 3
+problem dependency-violation a.c 4
 problem dependency-violation header.h 3
 problem file-size header.h 8
 problem include-count header.h 4