summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2015-09-30 17:53:14 +0100
committerPhilip Withnall <philip.withnall@collabora.co.uk>2015-10-01 09:21:08 +0100
commit1ae15f66af2af17e991ab028ca16a1200fd5f4e5 (patch)
tree3d77da79fa516fc31a7ac01cadeda724c08820fd /tests
parentea3348020da586f20e1a64c9732405e730563616 (diff)
downloadlibnice-1ae15f66af2af17e991ab028ca16a1200fd5f4e5.tar.gz
tests: Set candidate addresses in test-priority
This avoids an assertion failure in nice_address_to_string() when the addresses are compared for priority. Reviewed-by: Olivier CrĂȘte <olivier.crete@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D299
Diffstat (limited to 'tests')
-rw-r--r--tests/test-priority.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test-priority.c b/tests/test-priority.c
index f7d3273..4e41db5 100644
--- a/tests/test-priority.c
+++ b/tests/test-priority.c
@@ -47,8 +47,11 @@ main (void)
{
NiceCandidate *candidate;
- /* test 1 */
candidate = nice_candidate_new (NICE_CANDIDATE_TYPE_HOST);
+ nice_address_set_from_string (&candidate->addr, "127.0.0.1");
+ nice_address_set_from_string (&candidate->base_addr, "127.0.0.1");
+
+ /* test 1 */
g_assert (nice_candidate_jingle_priority (candidate) == 1000);
/* Host UDP */
candidate->transport = NICE_CANDIDATE_TRANSPORT_UDP;