Commit 6021a9762b9f375924a0e0e56bbd1dd739a2b37d

Daniel Stone 2012-08-03T03:45:14

test: Minimise includes Mostly from functions which used to use file functions directly, but now use test.h wrappers. Signed-off-by: Daniel Stone <daniel@fooishbar.org>

diff --git a/test/dump.c b/test/dump.c
index e1120e6..02b74c2 100644
--- a/test/dump.c
+++ b/test/dump.c
@@ -25,13 +25,8 @@
  */
 
 #include <assert.h>
-#include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <sys/types.h>
 
 #include "xkbcommon/xkbcommon.h"
 #include "test.h"
diff --git a/test/filecomp.c b/test/filecomp.c
index d5ec635..e56893b 100644
--- a/test/filecomp.c
+++ b/test/filecomp.c
@@ -25,10 +25,8 @@
  */
 
 #include <assert.h>
-#include <stdlib.h>
 #include <stdio.h>
-#include <string.h>
-#include <limits.h>
+#include <stdlib.h>
 
 #include "xkbcommon/xkbcommon.h"
 #include "test.h"
diff --git a/test/keysym.c b/test/keysym.c
index ff8685a..719202f 100644
--- a/test/keysym.c
+++ b/test/keysym.c
@@ -1,7 +1,6 @@
 #include <assert.h>
-#include <stdlib.h>
 #include <stdio.h>
-#include <string.h>
+#include <stdlib.h>
 
 #include "test.h"
 
diff --git a/test/rulescomp.c b/test/rulescomp.c
index 30c0df8..8eb9464 100644
--- a/test/rulescomp.c
+++ b/test/rulescomp.c
@@ -26,7 +26,6 @@
 
 #include <assert.h>
 #include <stdio.h>
-#include <string.h>
 #include <time.h>
 
 #include "xkbcommon/xkbcommon.h"
diff --git a/test/state.c b/test/state.c
index fe57844..4eccb34 100644
--- a/test/state.c
+++ b/test/state.c
@@ -29,8 +29,6 @@
 #include <linux/input.h>
 
 #include "xkbcommon/xkbcommon.h"
-#include "xkbcommon/xkbcommon-names.h"
-#include "xkb-priv.h"
 #include "test.h"
 
 /* Offset between evdev keycodes (where KEY_ESCAPE is 1), and the evdev XKB
diff --git a/test/stringcomp.c b/test/stringcomp.c
index b7513f6..e13a312 100644
--- a/test/stringcomp.c
+++ b/test/stringcomp.c
@@ -24,13 +24,8 @@
  */
 
 #include <assert.h>
-#include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/types.h>
 
 #include "xkbcommon/xkbcommon.h"
 #include "test.h"