From 77eb02d39a3cc85038be112c0e3b99445b47af70 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Tue, 20 Mar 2018 17:14:57 +0100 Subject: [PATCH] feat(tester/setup_tester): add test on ipv4 addresses (linphone_address_test) --- tester/setup_tester.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tester/setup_tester.c b/tester/setup_tester.c index f213e044e..590a3c41b 100644 --- a/tester/setup_tester.c +++ b/tester/setup_tester.c @@ -122,7 +122,7 @@ static void linphone_version_test(void){ static void core_init_test(void) { LinphoneCore* lc; lc = linphone_factory_create_core_2(linphone_factory_get(),NULL,NULL,NULL, NULL, system_context); - + /* until we have good certificates on our test server... */ linphone_core_verify_server_certificates(lc,FALSE); if (BC_ASSERT_PTR_NOT_NULL(lc)) { @@ -131,8 +131,18 @@ static void core_init_test(void) { } static void linphone_address_test(void) { + LinphoneAddress *address; + linphone_address_unref(create_linphone_address(NULL)); BC_ASSERT_PTR_NULL(linphone_address_new("sip:@sip.linphone.org")); + + address = linphone_address_new("sip:90.110.127.31"); + if (!BC_ASSERT_PTR_NOT_NULL(address)) return; + linphone_address_unref(address); + + address = linphone_address_new("sip:[::ffff:90.110.127.31]"); + if (!BC_ASSERT_PTR_NOT_NULL(address)) return; + linphone_address_unref(address); } static void core_sip_transport_test(void) {