From f8342703aa8857276bb90aca1dd86fb5074e2f72 Mon Sep 17 00:00:00 2001 From: Margaux Clerc Date: Thu, 19 Feb 2015 16:04:46 +0100 Subject: [PATCH] Add tests for jni and detect native crash --- liblinphone_tester/custom_rules.xml | 5 ++++- .../src/org/linphone/tester/WrapperTester.java | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/liblinphone_tester/custom_rules.xml b/liblinphone_tester/custom_rules.xml index 6279235ff..c9f246d14 100644 --- a/liblinphone_tester/custom_rules.xml +++ b/liblinphone_tester/custom_rules.xml @@ -50,7 +50,10 @@ - + + + + diff --git a/liblinphone_tester/src/org/linphone/tester/WrapperTester.java b/liblinphone_tester/src/org/linphone/tester/WrapperTester.java index 0351a8acf..da61728f0 100644 --- a/liblinphone_tester/src/org/linphone/tester/WrapperTester.java +++ b/liblinphone_tester/src/org/linphone/tester/WrapperTester.java @@ -3,6 +3,7 @@ package org.linphone.tester; import org.linphone.core.LinphoneCore; import org.linphone.core.LinphoneCoreFactory; import org.linphone.core.LinphoneCoreListenerBase; +import org.linphone.core.PayloadType; import android.test.AndroidTestCase; import junit.framework.Assert; @@ -41,12 +42,17 @@ public class WrapperTester extends AndroidTestCase { mCore.setVideoMulticastTtl(4); Assert.assertEquals(4, mCore.getVideoMulticastTtl()); + //Test setPrimaryContact String address = "Linphone Android "; mCore.setPrimaryContact(address); Assert.assertEquals(LinphoneCoreFactory.instance().createLinphoneAddress(address).getDisplayName(), LinphoneCoreFactory.instance().createLinphoneAddress(mCore.getPrimaryContact()).getDisplayName()); Assert.assertEquals(LinphoneCoreFactory.instance().createLinphoneAddress(address).getUserName(), LinphoneCoreFactory.instance().createLinphoneAddress(mCore.getPrimaryContact()).getUserName()); + + //Test setPayloadTypeNumber + mCore.setPayloadTypeNumber(mCore.findPayloadType("PCMU"),12); + Assert.assertEquals(mCore.getPayloadTypeNumber(mCore.findPayloadType("PCMU")),12); }