[farsight2/master] Test the content of returned candidates

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:26:19 PST 2008


---
 tests/check/transmitter/nice.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/check/transmitter/nice.c b/tests/check/transmitter/nice.c
index f50b4f0..d6a8915 100644
--- a/tests/check/transmitter/nice.c
+++ b/tests/check/transmitter/nice.c
@@ -60,9 +60,14 @@ _new_local_candidate (FsStreamTransmitter *st, FsCandidate *candidate,
   ts_fail_if (candidate->port == 0, "Candidate has port 0");
   ts_fail_unless (candidate->proto == FS_NETWORK_PROTOCOL_UDP,
     "Protocol is not UDP");
+  ts_fail_if (candidate->foundation == NULL,
+      "Candidate doenst have a foundation");
+  ts_fail_if (candidate->component_id == 0, "Component id is 0");
+  ts_fail_if (candidate->base_ip == NULL, "Candidate doesnt have a base ip");
+  ts_fail_if (candidate->base_port == 0, "Candidate doesnt have a base port");
+  ts_fail_if (candidate->username == NULL, "Candidate doenst have a username");
+  ts_fail_if (candidate->password == NULL, "Candidate doenst have a password");
 
-  ts_fail_unless (candidate->type == FS_CANDIDATE_TYPE_HOST,
-      "Does not have stun, but candidate is not host");
 
   candidates[candidate->component_id-1] = 1;
 
-- 
1.5.6.5




More information about the farsight-commits mailing list