summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2011-11-03 10:40:24 +0100
committerAndrea Canciani <ranma42@gmail.com>2011-11-09 09:17:00 +0100
commit06760f5cb069bdc041af7a0e73c9d5fc08741f28 (patch)
treebbdcc425a386a864ada5d80257d6ef14871176dc
parentcbd88a9416d9b33e6589e3f857ee839559a7e4de (diff)
test: Cleanup includes
All the tests are linked to libutil, hence it makes sence to always include utils.h and reuse what it provides (config.h inclusion, access to private pixman APIs, ARRAY_LENGTH, ...).
-rw-r--r--test/a1-trap-test.c2
-rw-r--r--test/blitters-test.c1
-rw-r--r--test/composite-traps-test.c1
-rw-r--r--test/composite.c2
-rw-r--r--test/fetch-test.c6
-rw-r--r--test/lowlevel-blt-bench.c4
-rw-r--r--test/oob-test.c2
-rw-r--r--test/region-contains-test.c1
-rw-r--r--test/region-translate-test.c2
-rw-r--r--test/scaling-crash-test.c2
-rw-r--r--test/scaling-test.c1
-rw-r--r--test/stress-test.c1
-rw-r--r--test/trap-crasher.c2
-rw-r--r--test/utils.c1
-rw-r--r--test/utils.h1
15 files changed, 8 insertions, 21 deletions
diff --git a/test/a1-trap-test.c b/test/a1-trap-test.c
index 6163e7c6..93c6caa1 100644
--- a/test/a1-trap-test.c
+++ b/test/a1-trap-test.c
@@ -2,7 +2,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "pixman.h"
+#include "utils.h"
int
main (int argc, char **argv)
diff --git a/test/blitters-test.c b/test/blitters-test.c
index 4f931c44..6355632a 100644
--- a/test/blitters-test.c
+++ b/test/blitters-test.c
@@ -5,7 +5,6 @@
* Script 'fuzzer-find-diff.pl' can be used to narrow down the problem in
* the case of test failure.
*/
-#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include "utils.h"
diff --git a/test/composite-traps-test.c b/test/composite-traps-test.c
index fa6d8a98..ff03b50d 100644
--- a/test/composite-traps-test.c
+++ b/test/composite-traps-test.c
@@ -1,6 +1,5 @@
/* Based loosely on scaling-test */
-#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include "utils.h"
diff --git a/test/composite.c b/test/composite.c
index 408c363a..fe59eae3 100644
--- a/test/composite.c
+++ b/test/composite.c
@@ -22,8 +22,6 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-#define PIXMAN_USE_INTERNAL_API
-#include <pixman.h>
#include <stdio.h>
#include <stdlib.h> /* abort() */
#include <math.h>
diff --git a/test/fetch-test.c b/test/fetch-test.c
index 9f80eec1..fa79ad7c 100644
--- a/test/fetch-test.c
+++ b/test/fetch-test.c
@@ -1,11 +1,7 @@
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
-#include "pixman.h"
+#include "utils.h"
#define SIZE 1024
diff --git a/test/lowlevel-blt-bench.c b/test/lowlevel-blt-bench.c
index bdafb359..67cd939d 100644
--- a/test/lowlevel-blt-bench.c
+++ b/test/lowlevel-blt-bench.c
@@ -25,10 +25,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
-#define PIXMAN_USE_INTERNAL_API
-#include <pixman.h>
-
#include "utils.h"
#define SOLID_FLAG 1
diff --git a/test/oob-test.c b/test/oob-test.c
index 4f9e5a24..9c1a25d0 100644
--- a/test/oob-test.c
+++ b/test/oob-test.c
@@ -1,6 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include "pixman.h"
+#include "utils.h"
typedef struct
{
diff --git a/test/region-contains-test.c b/test/region-contains-test.c
index b660fdf0..2372686f 100644
--- a/test/region-contains-test.c
+++ b/test/region-contains-test.c
@@ -1,4 +1,3 @@
-#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include "utils.h"
diff --git a/test/region-translate-test.c b/test/region-translate-test.c
index 0e96a5eb..5a03027e 100644
--- a/test/region-translate-test.c
+++ b/test/region-translate-test.c
@@ -1,5 +1,5 @@
-#include <pixman.h>
#include <assert.h>
+#include "utils.h"
/* Pixman had a bug where 32bit regions where clipped to 16bit sizes when
* pixman_region32_translate() was called. This test exercises that bug.
diff --git a/test/scaling-crash-test.c b/test/scaling-crash-test.c
index 40323d41..50d445d2 100644
--- a/test/scaling-crash-test.c
+++ b/test/scaling-crash-test.c
@@ -2,7 +2,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include "pixman.h"
+#include "utils.h"
/*
* We have a source image filled with solid color, set NORMAL or PAD repeat,
diff --git a/test/scaling-test.c b/test/scaling-test.c
index 82370f77..6f2da143 100644
--- a/test/scaling-test.c
+++ b/test/scaling-test.c
@@ -7,7 +7,6 @@
* Script 'fuzzer-find-diff.pl' can be used to narrow down the problem in
* the case of test failure.
*/
-#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include "utils.h"
diff --git a/test/stress-test.c b/test/stress-test.c
index 571420ab..08bf1d4d 100644
--- a/test/stress-test.c
+++ b/test/stress-test.c
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <stdlib.h>
#include "utils.h"
#include <sys/types.h>
diff --git a/test/trap-crasher.c b/test/trap-crasher.c
index 7485e62f..db7e01aa 100644
--- a/test/trap-crasher.c
+++ b/test/trap-crasher.c
@@ -1,5 +1,5 @@
#include <stdlib.h>
-#include <pixman.h>
+#include "utils.h"
int
main()
diff --git a/test/utils.c b/test/utils.c
index adabd75d..204066f9 100644
--- a/test/utils.c
+++ b/test/utils.c
@@ -2,6 +2,7 @@
#include "utils.h"
#include <signal.h>
+#include <stdlib.h>
#ifdef HAVE_GETTIMEOFDAY
#include <sys/time.h>
diff --git a/test/utils.h b/test/utils.h
index b23925c4..3bff78e7 100644
--- a/test/utils.h
+++ b/test/utils.h
@@ -2,7 +2,6 @@
#include <config.h>
#endif
-#include <stdlib.h>
#include <assert.h>
#include "pixman-private.h" /* For 'inline' definition */