Skip to content

Commit 781371b

Browse files
Added Testcases for CpuArchHelper.java
1 parent 2dc2a4b commit 781371b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.github.hiteshsondhi88.libffmpeg;
2+
3+
import android.os.Build;
4+
5+
import junit.framework.TestCase;
6+
7+
public class CpuArchHelperTest extends TestCase {
8+
9+
public void testGetCpuArch() throws Exception {
10+
CpuArch cpuArch = CpuArchHelper.getCpuArch();
11+
assertNotNull(cpuArch);
12+
if (Build.CPU_ABI.equals(CpuArchHelper.getx86CpuAbi()) || Build.CPU_ABI.equals(CpuArchHelper.getArmeabiv7CpuAbi())) {
13+
assertNotSame(cpuArch, CpuArch.NONE);
14+
} else {
15+
assertEquals(cpuArch, CpuArch.NONE);
16+
}
17+
}
18+
}

0 commit comments

Comments
 (0)