diff options
author | Chris Wilson <chris+github@qwirx.com> | 2006-09-02 11:16:22 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2006-09-02 11:16:22 +0000 |
commit | 300d1fc0c31b6122d2e897acd5cee93a05eef61c (patch) | |
tree | f0713617e2582bdd9b05456e95eb56c9d5aece75 /infrastructure/buildenv-testmain-template.cpp | |
parent | 23fead5de5ef2dc968d46e5a7a4d50f9e36b774a (diff) |
(refs #3)
Automatically initialise Windows sockets for all tests
Diffstat (limited to 'infrastructure/buildenv-testmain-template.cpp')
-rw-r--r-- | infrastructure/buildenv-testmain-template.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/infrastructure/buildenv-testmain-template.cpp b/infrastructure/buildenv-testmain-template.cpp index c64c1fa5..7adbafa9 100644 --- a/infrastructure/buildenv-testmain-template.cpp +++ b/infrastructure/buildenv-testmain-template.cpp @@ -103,6 +103,14 @@ int main(int argc, const char *argv[]) // banner printf("Running test TEST_NAME in " MODE_TEXT " mode...\n"); + + #ifdef WIN32 + // Under win32 we must initialise the Winsock library + // before using sockets + + WSADATA info; + TEST_THAT(WSAStartup(0x0101, &info) != SOCKET_ERROR) + #endif } try { |