File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
src/test/java/com/reandroid/arsc/chunk Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com .reandroid .arsc .chunk ;
2
+
3
+ import org .junit .Assert ;
4
+ import org .junit .Test ;
5
+
6
+ public class PackageBlockTest {
7
+
8
+ @ Test
9
+ public void testIsResourceId () {
10
+ Assert .assertFalse (PackageBlock .isResourceId (0x7f00ffff ));
11
+ Assert .assertFalse (PackageBlock .isResourceId (0x00ff0000 ));
12
+ Assert .assertFalse (PackageBlock .isResourceId (0x00ffffff ));
13
+ Assert .assertFalse (PackageBlock .isResourceId (0x0000ffff ));
14
+ Assert .assertFalse (PackageBlock .isResourceId (0xff000000 ));
15
+ Assert .assertFalse (PackageBlock .isResourceId (0x0 ));
16
+ Assert .assertTrue (PackageBlock .isResourceId (0x0101ffff ));
17
+ Assert .assertTrue (PackageBlock .isResourceId (0x01010000 ));
18
+ }
19
+
20
+ @ Test
21
+ public void testIsPackageId () {
22
+ Assert .assertFalse (PackageBlock .isPackageId (0x00 ));
23
+ Assert .assertFalse (PackageBlock .isPackageId (0xfff ));
24
+ Assert .assertFalse (PackageBlock .isPackageId (0xffff ));
25
+ Assert .assertFalse (PackageBlock .isPackageId (0xfffff ));
26
+ Assert .assertFalse (PackageBlock .isPackageId (0xffffff ));
27
+ Assert .assertFalse (PackageBlock .isPackageId (0xffffffff ));
28
+ Assert .assertTrue (PackageBlock .isPackageId (0x01 ));
29
+ Assert .assertTrue (PackageBlock .isPackageId (0x11 ));
30
+ Assert .assertTrue (PackageBlock .isPackageId (0xff ));
31
+ }
32
+
33
+ }
You can’t perform that action at this time.
0 commit comments