blob: 5f0f6e33bb6cc8489c9ad5a41cd30fed72c00d3c [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
Jens Geyer1c190272015-07-28 23:15:18 +020011test_thrift_server (void)
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{
Jens Geyer1c190272015-07-28 23:15:18 +020022#if (!GLIB_CHECK_VERSION (2, 36, 0))
Roger Meierc1010922010-11-26 10:17:48 +000023 g_type_init();
Jens Geyer1c190272015-07-28 23:15:18 +020024#endif
25
Roger Meierc1010922010-11-26 10:17:48 +000026 g_test_init (&argc, &argv, NULL);
Roger Meier213a6642010-10-27 12:30:11 +000027
Roger Meierc1010922010-11-26 10:17:48 +000028 g_test_add_func ("/testthrift/Server", test_thrift_server);
29
30 return g_test_run ();
31}