Add tests for jni and detect native crash
This commit is contained in:
parent
0c6b672fd7
commit
0e0e7d29be
2 changed files with 10 additions and 1 deletions
|
@ -50,7 +50,10 @@
|
||||||
</condition>
|
</condition>
|
||||||
</fail>
|
</fail>
|
||||||
<condition property="has.crashed" >
|
<condition property="has.crashed" >
|
||||||
<resourcecontains resource="${output.file}" substring="Process crashed" />
|
<or>
|
||||||
|
<resourcecontains resource="${output.file}" substring="Process crashed" />
|
||||||
|
<resourcecontains resource="${output.file}" substring="Native crash" />
|
||||||
|
</or>
|
||||||
</condition>
|
</condition>
|
||||||
<antcall target="check-for-crash"/>
|
<antcall target="check-for-crash"/>
|
||||||
<delete file="${archive.name}"/>
|
<delete file="${archive.name}"/>
|
||||||
|
|
|
@ -3,6 +3,7 @@ package org.linphone.tester;
|
||||||
import org.linphone.core.LinphoneCore;
|
import org.linphone.core.LinphoneCore;
|
||||||
import org.linphone.core.LinphoneCoreFactory;
|
import org.linphone.core.LinphoneCoreFactory;
|
||||||
import org.linphone.core.LinphoneCoreListenerBase;
|
import org.linphone.core.LinphoneCoreListenerBase;
|
||||||
|
import org.linphone.core.PayloadType;
|
||||||
|
|
||||||
import android.test.AndroidTestCase;
|
import android.test.AndroidTestCase;
|
||||||
import junit.framework.Assert;
|
import junit.framework.Assert;
|
||||||
|
@ -41,6 +42,7 @@ public class WrapperTester extends AndroidTestCase {
|
||||||
mCore.setVideoMulticastTtl(4);
|
mCore.setVideoMulticastTtl(4);
|
||||||
Assert.assertEquals(4, mCore.getVideoMulticastTtl());
|
Assert.assertEquals(4, mCore.getVideoMulticastTtl());
|
||||||
|
|
||||||
|
//Test setPrimaryContact
|
||||||
String address = "Linphone Android <sip:linphone.android@unknown-host>";
|
String address = "Linphone Android <sip:linphone.android@unknown-host>";
|
||||||
mCore.setPrimaryContact(address);
|
mCore.setPrimaryContact(address);
|
||||||
Assert.assertEquals(LinphoneCoreFactory.instance().createLinphoneAddress(address).getDisplayName(),
|
Assert.assertEquals(LinphoneCoreFactory.instance().createLinphoneAddress(address).getDisplayName(),
|
||||||
|
@ -48,6 +50,10 @@ public class WrapperTester extends AndroidTestCase {
|
||||||
Assert.assertEquals(LinphoneCoreFactory.instance().createLinphoneAddress(address).getUserName(),
|
Assert.assertEquals(LinphoneCoreFactory.instance().createLinphoneAddress(address).getUserName(),
|
||||||
LinphoneCoreFactory.instance().createLinphoneAddress(mCore.getPrimaryContact()).getUserName());
|
LinphoneCoreFactory.instance().createLinphoneAddress(mCore.getPrimaryContact()).getUserName());
|
||||||
|
|
||||||
|
//Test setPayloadTypeNumber
|
||||||
|
mCore.setPayloadTypeNumber(mCore.findPayloadType("PCMU"),12);
|
||||||
|
Assert.assertEquals(mCore.getPayloadTypeNumber(mCore.findPayloadType("PCMU")),12);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue