Skip to content

Commit 8188475

Browse files
Updated test cases for CpuArchHelper
1 parent 56f0ec7 commit 8188475

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

FFmpegAndroid/src/androidTest/java/com/github/hiteshsondhi88/libffmpeg/CpuArchHelperTest.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,21 @@
44

55
import junit.framework.TestCase;
66

7+
import static org.assertj.core.api.Assertions.assertThat;
8+
79
public class CpuArchHelperTest extends TestCase {
810

911
public void testGetCpuArch() throws Exception {
1012
CpuArch cpuArch = CpuArchHelper.getCpuArch();
1113
assertNotNull(cpuArch);
12-
if (Build.CPU_ABI.equals(CpuArchHelper.getx86CpuAbi()) || Build.CPU_ABI.equals(CpuArchHelper.getArmeabiv7CpuAbi())) {
13-
assertNotSame(cpuArch, CpuArch.NONE);
14+
if (Build.CPU_ABI.equals(CpuArchHelper.getx86CpuAbi())) {
15+
assertEquals(cpuArch, CpuArch.x86);
16+
} else if (Build.CPU_ABI.equals(CpuArchHelper.getArmeabiv7CpuAbi())) {
17+
assertThat(cpuArch == CpuArch.ARMv7 || cpuArch == CpuArch.ARMv7_NEON).isTrue();
1418
} else {
1519
assertEquals(cpuArch, CpuArch.NONE);
1620
}
1721
}
22+
23+
1824
}

0 commit comments

Comments
 (0)