[farsight2/master] tests: Add tests for ToS
Olivier Crête
olivier.crete at collabora.co.uk
Sat Jul 25 12:26:15 PDT 2009
---
tests/check/rtp/generic.c | 6 ++++++
tests/check/transmitter/multicast.c | 5 +++++
tests/check/transmitter/rawudp.c | 5 +++++
3 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/tests/check/rtp/generic.c b/tests/check/rtp/generic.c
index 712ec70..b792924 100644
--- a/tests/check/rtp/generic.c
+++ b/tests/check/rtp/generic.c
@@ -36,6 +36,7 @@ setup_simple_conference (
{
struct SimpleTestConference *dat = g_new0 (struct SimpleTestConference, 1);
GError *error = NULL;
+ guint tos;
dat->id = id;
dat->cname = g_strdup (cname);
@@ -57,6 +58,11 @@ setup_simple_conference (
error->code, error->message);
fail_if (dat->session == NULL, "Could not make session, but no GError!");
+ g_object_set (dat->session, "tos", 2, NULL);
+ g_object_get (dat->session, "tos", &tos, NULL);
+ fail_unless (tos == 2);
+
+
g_object_set_data (G_OBJECT (dat->conference), "dat", dat);
return dat;
diff --git a/tests/check/transmitter/multicast.c b/tests/check/transmitter/multicast.c
index c1e9bf9..6b66b1d 100644
--- a/tests/check/transmitter/multicast.c
+++ b/tests/check/transmitter/multicast.c
@@ -128,6 +128,7 @@ run_multicast_transmitter_test (gint n_parameters, GParameter *params,
FsCandidate *tmpcand = NULL;
GList *candidates = NULL;
GstBus *bus = NULL;
+ guint tos;
buffer_count[0] = 0;
buffer_count[1] = 0;
@@ -148,6 +149,10 @@ run_multicast_transmitter_test (gint n_parameters, GParameter *params,
ts_fail_if (trans == NULL, "No transmitter create, yet error is still NULL");
+ g_object_set (trans, "tos", 2, NULL);
+ g_object_get (trans, "tos", &tos, NULL);
+ ts_fail_unless (tos == 2);
+
if (flags & FLAG_RECVONLY_FILTER)
ts_fail_unless (g_signal_connect (trans, "get-recvonly-filter",
G_CALLBACK (_get_recvonly_filter), NULL));
diff --git a/tests/check/transmitter/rawudp.c b/tests/check/transmitter/rawudp.c
index 6be180b..7ab57db 100644
--- a/tests/check/transmitter/rawudp.c
+++ b/tests/check/transmitter/rawudp.c
@@ -280,6 +280,7 @@ run_rawudp_transmitter_test (gint n_parameters, GParameter *params,
FsTransmitter *trans;
FsStreamTransmitter *st;
GstBus *bus = NULL;
+ guint tos;
buffer_count[0] = 0;
buffer_count[1] = 0;
@@ -306,6 +307,10 @@ run_rawudp_transmitter_test (gint n_parameters, GParameter *params,
ts_fail_if (trans == NULL, "No transmitter create, yet error is still NULL");
+ g_object_set (trans, "tos", 2, NULL);
+ g_object_get (trans, "tos", &tos, NULL);
+ ts_fail_unless (tos == 2);
+
if (flags & FLAG_RECVONLY_FILTER)
ts_fail_unless (g_signal_connect (trans, "get-recvonly-filter",
G_CALLBACK (get_recvonly_filter), NULL));
--
1.5.6.5
More information about the farsight-commits
mailing list