[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tests: include main header first
From: |
Bruno Haible |
Subject: |
tests: include main header first |
Date: |
Thu, 24 Dec 2009 13:49:02 +0100 |
User-agent: |
KMail/1.9.9 |
As a preparation for the ASSERT and SIGNATURE_CHECK changes, I'm applying the
common idiom to more test files: include the specification header first,
right after <config.h>. This verifies that the header is standalone.
2009-12-24 Bruno Haible <address@hidden>
* tests/test-argv-iter.c: Include header file being tested immediately
after config.h.
* tests/test-base64.c: Likewise.
* tests/test-flock.c: Likewise.
* tests/test-fsync.c: Likewise.
* tests/test-getdate.c: Likewise.
* tests/test-getndelim2.c: Likewise.
* tests/test-isfinite.c: Likewise.
* tests/test-isinf.c: Likewise.
* tests/test-strerror.c: Likewise.
* tests/test-strsignal.c: Likewise.
--- tests/test-argv-iter.c.orig Thu Dec 24 13:43:08 2009
+++ tests/test-argv-iter.c Thu Dec 24 13:37:57 2009
@@ -17,6 +17,9 @@
/* Written by Jim Meyering. */
#include <config.h>
+
+#include "argv-iter.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -35,8 +38,6 @@
} \
while (0)
-#include "argv-iter.h"
-
static FILE *
write_nul_delimited_argv (char **argv)
{
--- tests/test-base64.c.orig Thu Dec 24 13:43:08 2009
+++ tests/test-base64.c Thu Dec 24 13:37:57 2009
@@ -17,6 +17,8 @@
#include <config.h>
+#include "base64.h"
+
#include <stddef.h>
#include <stdio.h>
#include <stdbool.h>
@@ -24,8 +26,6 @@
#include <string.h>
#include <stdint.h>
-#include "base64.h"
-
#define ASSERT(expr) \
do \
{ \
--- tests/test-flock.c.orig Thu Dec 24 13:43:08 2009
+++ tests/test-flock.c Thu Dec 24 13:37:57 2009
@@ -1,5 +1,5 @@
/* Test of flock() function.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -16,14 +16,14 @@
#include <config.h>
+#include <sys/file.h>
+
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
-#include <sys/file.h>
-
#define ASSERT(expr) \
do \
{ \
--- tests/test-fsync.c.orig Thu Dec 24 13:43:08 2009
+++ tests/test-fsync.c Thu Dec 24 13:37:58 2009
@@ -16,10 +16,11 @@
#include <config.h>
+#include <unistd.h>
+
#include <errno.h>
#include <stdio.h>
#include <fcntl.h>
-#include <unistd.h>
#define ASSERT(expr) \
do \
--- tests/test-getdate.c.orig Thu Dec 24 13:43:08 2009
+++ tests/test-getdate.c Thu Dec 24 13:37:58 2009
@@ -19,14 +19,14 @@
#include <config.h>
+#include "getdate.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "progname.h"
-#include "getdate.h"
-
#define ASSERT(expr) \
do \
{ \
--- tests/test-getndelim2.c.orig Thu Dec 24 13:43:08 2009
+++ tests/test-getndelim2.c Thu Dec 24 13:37:58 2009
@@ -19,12 +19,12 @@
#include <config.h>
+#include "getndelim2.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "getndelim2.h"
-
#define ASSERT(expr) \
do \
{ \
--- tests/test-isfinite.c.orig Thu Dec 24 13:43:08 2009
+++ tests/test-isfinite.c Thu Dec 24 13:37:58 2009
@@ -1,5 +1,5 @@
/* Test of isfinite() substitute.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,10 +19,10 @@
#include <config.h>
-#include <float.h>
-#include <limits.h>
#include <math.h>
+#include <float.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
--- tests/test-isinf.c.orig Thu Dec 24 13:43:08 2009
+++ tests/test-isinf.c Thu Dec 24 13:37:58 2009
@@ -1,5 +1,5 @@
/* Test of isinf() substitute.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,10 +19,10 @@
#include <config.h>
-#include <float.h>
-#include <limits.h>
#include <math.h>
+#include <float.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
--- tests/test-priv-set.c.orig Thu Dec 24 13:43:08 2009
+++ tests/test-priv-set.c Thu Dec 24 13:37:58 2009
@@ -17,6 +17,7 @@
/* Written by David Bartley <address@hidden>, 2007. */
#include <config.h>
+
#include "priv-set.h"
#if HAVE_GETPPRIV
--- tests/test-random_r.c.orig Thu Dec 24 13:43:08 2009
+++ tests/test-random_r.c Thu Dec 24 13:37:58 2009
@@ -1,5 +1,5 @@
/* Test random_r.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,7 +15,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
+
#include <stdlib.h>
+
#include <stdio.h>
#include <time.h>
--- tests/test-strerror.c.orig Thu Dec 24 13:43:08 2009
+++ tests/test-strerror.c Thu Dec 24 13:37:58 2009
@@ -19,10 +19,11 @@
#include <config.h>
+#include <string.h>
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#define ASSERT(expr) \
do \
--- tests/test-strsignal.c.orig Thu Dec 24 13:43:08 2009
+++ tests/test-strsignal.c Thu Dec 24 13:37:58 2009
@@ -19,10 +19,11 @@
#include <config.h>
+#include <string.h>
+
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#define ASSERT(expr) \
do \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- tests: include main header first,
Bruno Haible <=