blob: 806166e22ec45761da9ef09b45c1f02812919044 [file] [log] [blame]
Roger Meier213a6642010-10-27 12:30:11 +00001#include <assert.h>
2#include <netdb.h>
3
Roger Meier49ff8b12012-04-13 09:12:31 +00004#include <thrift/transport/thrift_server_transport.h>
5#include <thrift/transport/thrift_server_socket.h>
Roger Meier213a6642010-10-27 12:30:11 +00006
7static const char TEST_ADDRESS[] = "localhost";
8static const int TEST_PORT = 64444;
9
Roger Meier213a6642010-10-27 12:30:11 +000010static void
Roger Meierc1010922010-11-26 10:17:48 +000011test_thrift_server (const int port)
Roger Meier213a6642010-10-27 12:30:11 +000012{
13 ThriftServerSocket *tsocket = g_object_new (THRIFT_TYPE_SERVER_SOCKET,
Roger Meierc1010922010-11-26 10:17:48 +000014 "port", TEST_PORT, NULL);
Roger Meier213a6642010-10-27 12:30:11 +000015
16 g_object_unref (tsocket);
17}
18
19int
Roger Meierc1010922010-11-26 10:17:48 +000020main(int argc, char *argv[])
Roger Meier213a6642010-10-27 12:30:11 +000021{
Roger Meierc1010922010-11-26 10:17:48 +000022 g_type_init();
23 g_test_init (&argc, &argv, NULL);
Roger Meier213a6642010-10-27 12:30:11 +000024
Roger Meierc1010922010-11-26 10:17:48 +000025 g_test_add_func ("/testthrift/Server", test_thrift_server);
26
27 return g_test_run ();
28}