blob: b14b60688fab524fddeef09c8e672f4fb0aceb42 [file] [log] [blame]
Roger Meier213a6642010-10-27 12:30:11 +00001#include <assert.h>
2#include <netdb.h>
3
4#include "transport/thrift_server_transport.h"
5#include "transport/thrift_server_socket.h"
6
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}