Commit fe55ca06 authored by Jakub Adam's avatar Jakub Adam

tests: Initialize Windows Sockets where needed

Fixes failing test cases on Windows.
parent 83c5d0fc
......@@ -3,6 +3,7 @@
#include <string.h>
#include <gio/gio.h>
#include <gio/gnetworking.h>
#include <agent.h>
static NiceComponentState global_lagent_state[2] = { NICE_COMPONENT_STATE_LAST, NICE_COMPONENT_STATE_LAST };
......@@ -250,6 +251,8 @@ main (int argc, char **argv)
{
int ret;
g_networking_init ();
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/nice/nomination/regular", regular);
......
......@@ -33,6 +33,7 @@
#endif
#include <locale.h>
#include <gio/gnetworking.h>
#include "socket.h"
......@@ -84,6 +85,8 @@ main (int argc, char *argv[])
NiceAddress addr;
g_networking_init ();
setlocale (LC_ALL, "");
g_test_init (&argc, &argv, NULL);
......
......@@ -38,6 +38,7 @@
#include <string.h>
#include <stdio.h>
#include <gio/gnetworking.h>
#include "socket.h"
......@@ -88,6 +89,8 @@ main (void)
NiceAddress active_bind_addr, passive_bind_addr;
GSource *srv_listen_source, *srv_input_source, *cli_input_source;
g_networking_init ();
mainloop = g_main_loop_new (NULL, FALSE);
nice_address_init (&active_bind_addr);
......
......@@ -32,6 +32,11 @@
# include "config.h"
#endif
// With _GNU_SOURCE, enumeration in netinet/tcp.h and PseudoTcpState clash
#undef _GNU_SOURCE
#define _POSIX_SOURCE 1
#include <gio/gnetworking.h>
#include "agent-priv.h"
#include "socket.h"
......@@ -203,6 +208,8 @@ main (int argc, char *argv[])
{
GMainLoop *mainloop;
g_networking_init ();
randg = g_rand_new();
g_test_init (&argc, &argv, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment