[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
enhance sys_select tests
From: |
Bruno Haible |
Subject: |
enhance sys_select tests |
Date: |
Sat, 23 Jul 2011 03:24:54 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) |
The FD_* macros/functions are defined by the <sys/select.h> header file,
not by the select() function. Therefore I'm moving their unit tests:
2011-07-22 Bruno Haible <address@hidden>
sys_select tests: Check the signature of FD_*.
* tests/test-select.c (FD_CLR, FD_ISSET, FD_SET, FD_ZERO): Move
signature tests from here...
* tests/test-sys_select.c (FD_CLR, FD_ISSET, FD_SET, FD_ZERO): ... to
here.
* modules/sys_select-tests (Files): Add tests/signature.h.
--- modules/sys_select-tests.orig Sat Jul 23 03:20:17 2011
+++ modules/sys_select-tests Sat Jul 23 03:18:10 2011
@@ -1,5 +1,6 @@
Files:
tests/test-sys_select.c
+tests/signature.h
Depends-on:
sys_select-c++-tests
--- tests/test-select.c.orig Sat Jul 23 03:20:17 2011
+++ tests/test-select.c Sat Jul 23 03:19:48 2011
@@ -31,21 +31,6 @@
struct timeval *));
#endif
-/* The following may be macros without underlying functions, so only
- check signature if they are not macros. */
-#ifndef FD_CLR
-SIGNATURE_CHECK (FD_CLR, void, (int, fd_set *));
-#endif
-#ifndef FD_ISSET
-SIGNATURE_CHECK (FD_ISSET, void, (int, fd_set *));
-#endif
-#ifndef FD_SET
-SIGNATURE_CHECK (FD_SET, int, (int, fd_set *));
-#endif
-#ifndef FD_ZERO
-SIGNATURE_CHECK (FD_ZERO, void, (fd_set *));
-#endif
-
#include <stdio.h>
#include <string.h>
#include <netinet/in.h>
--- tests/test-sys_select.c.orig Sat Jul 23 03:20:17 2011
+++ tests/test-sys_select.c Sat Jul 23 03:17:45 2011
@@ -20,6 +20,23 @@
#include <sys/select.h>
+#include "signature.h"
+
+/* The following may be macros without underlying functions, so only
+ check signature if they are not macros. */
+#ifndef FD_CLR
+SIGNATURE_CHECK (FD_CLR, void, (int, fd_set *));
+#endif
+#ifndef FD_ISSET
+SIGNATURE_CHECK (FD_ISSET, void, (int, fd_set *));
+#endif
+#ifndef FD_SET
+SIGNATURE_CHECK (FD_SET, int, (int, fd_set *));
+#endif
+#ifndef FD_ZERO
+SIGNATURE_CHECK (FD_ZERO, void, (fd_set *));
+#endif
+
/* Check that the 'struct timeval' type is defined. */
struct timeval t1;
--
In memoriam Dmitry Pavlov <http://en.wikipedia.org/wiki/Dmitry_Pavlov_(general)>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- enhance sys_select tests,
Bruno Haible <=