/* * Unit tests for 32-bit socket functions in Wine * * Copyright (c) 2005 Thomas Kho, Fredy Garcia, Douglas Rosenberg * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include #ifndef STANDALONE #include "wine/test.h" #else #include #define START_TEST(name) main(int argc, char **argv) #define ok(condition, msg) \ do { \ if(!(condition)) \ { \ fprintf(stderr,"failed at %d\n",__LINE__); \ exit(0); \ } \ } while(0) #define todo_wine #endif //#include //#include static void test_NamedPipe_2(void) { // something simple printf("Hello, World\n"); //while(1) printf("Main Thread\n"); //ok(SetEvent( alarm_event ), "SetEvent\n"); //CloseHandle( alarm_event ); //trace("test_NamedPipe_2 returning\n"); } static void test_Initialization(void) { // initialize application WSADATA mywsadata; int wsastartup_result = WSAStartup(MAKEWORD(2,2), &mywsadata); ok((wsastartup_result != NO_ERROR), "Error in WSAStartup()"); } void SampleThread1() { while(1) { printf("Thread 1\n"); } } void SampleThread2() { while(1) { printf("Thread 2\n"); } } START_TEST(wsock32_main) { //_beginthread( SampleThread1, 0, NULL ); //_beginthread( SampleThread2, 0, NULL ); trace("simple test:\n"); test_Initialization(); //test_DisconnectNamedPipe(); //trace("test 2 of 4:\n"); //test_CreateNamedPipe_instances_must_match(); //trace("test 3 of 4:\n"); test_NamedPipe_2(); //trace("test 4 of 4:\n"); //test_CreateNamedPipe(PIPE_TYPE_BYTE); //trace("all tests done\n"); //test_CreateNamedPipe(PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE); trace("all tests done\n"); }