diff options
Diffstat (limited to 'dejagnu.h')
-rw-r--r-- | dejagnu.h | 36 |
1 files changed, 4 insertions, 32 deletions
@@ -25,15 +25,10 @@ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ #include <string.h> /* If you have problems with DejaGnu dropping failed, untested, or - * unresolved messages generated by a unit testcase, then: */ - -/* #define _DEJAGNU_WAIT_ */ - -#ifdef _DEJAGNU_WAIT_ -#include <sys/time.h> -#include <sys/types.h> -#include <unistd.h> -#endif + * unresolved messages generated by a unit testcase, then see the section + * "Priority of Expect Patterns" in *note (dejagnu)Writing a test case. or + * use the DejaGnu built-in unit testing support in your testsuite, which + * has been improved to resolve this issue in DejaGnu 1.6.3. */ static int passed; static int failed; @@ -45,21 +40,6 @@ static int xpassed; static char buffer[512]; -void -wait (void) -{ -#ifdef _DEJAGNU_WAIT_ - fd_set rfds; - struct timeval tv; - - FD_ZERO (&rfds); - tv.tv_sec = 0; - tv.tv_usec = 1; - - select (0, &rfds, NULL, NULL, &tv); -#endif -} - static inline void pass (const char* fmt, ...) { @@ -70,7 +50,6 @@ pass (const char* fmt, ...) vsnprintf (buffer, sizeof (buffer), fmt, ap); va_end (ap); printf ("\tPASSED: %s\n", buffer); - wait (); } static inline void @@ -83,7 +62,6 @@ xpass (const char* fmt, ...) vsnprintf (buffer, sizeof (buffer), fmt, ap); va_end (ap); printf ("\tXPASSED: %s\n", buffer); - wait (); } static inline void @@ -96,7 +74,6 @@ fail (const char* fmt, ...) vsnprintf (buffer, sizeof (buffer), fmt, ap); va_end (ap); printf ("\tFAILED: %s\n", buffer); - wait (); } static inline void @@ -109,7 +86,6 @@ xfail (const char* fmt, ...) vsnprintf (buffer, sizeof (buffer), fmt, ap); va_end (ap); printf ("\tXFAILED: %s\n", buffer); - wait (); } static inline void @@ -122,7 +98,6 @@ untested (const char* fmt, ...) vsnprintf (buffer, sizeof (buffer), fmt, ap); va_end (ap); printf ("\tUNTESTED: %s\n", buffer); - wait (); } static inline void @@ -135,7 +110,6 @@ unresolved (const char* fmt, ...) vsnprintf (buffer, sizeof (buffer), fmt, ap); va_end (ap); printf ("\tUNRESOLVED: %s\n", buffer); - wait (); } static inline void @@ -148,7 +122,6 @@ unsupported (const char* fmt, ...) vsnprintf (buffer, sizeof (buffer), fmt, ap); va_end (ap); printf ("\tUNSUPPORTED: %s\n", buffer); - wait (); } static inline void @@ -160,7 +133,6 @@ note (const char* fmt, ...) vsnprintf (buffer, sizeof (buffer), fmt, ap); va_end (ap); printf ("\tNOTE: %s\n", buffer); - wait (); } static inline void |