blob: a42d0899a376f3242a855bb61b92b7f1b7da46f3 [file] [log] [blame]
Roger Meier213a6642010-10-27 12:30:11 +00001#include <assert.h>
2#include <netdb.h>
3
Roger Meiere3da7682013-01-11 11:41:53 +01004#include <thrift/c_glib/transport/thrift_server_transport.h>
5#include <thrift/c_glib/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}