Skip to content

Commit

Permalink
test: Unknown resource id and duplicate attribute REAndroid/APKEditor#43
Browse files Browse the repository at this point in the history
  • Loading branch information
REAndroid committed Jul 4, 2023
1 parent e37e38f commit 092f2af
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ public void testEncodeDecodeXml() throws XmlPullParserException, IOException {
ResXmlElement root = document.getResXmlElement();
Assert.assertNotNull(root);
Assert.assertEquals(3, root.countElements());
Assert.assertEquals(1, root.getNamespaceCount());
Assert.assertEquals(8, root.getAttributeCount());
Assert.assertEquals(2, root.getNamespaceCount());
Assert.assertEquals(10, root.getAttributeCount());

ResXmlAttribute attribute = root.searchAttributeByName("style");
Assert.assertNotNull(attribute);
Expand Down Expand Up @@ -152,10 +152,14 @@ private static TableBlock createDummy() throws IOException {
" android:versionName=\"1.0\"\n" +
" android:compileSdkVersion=\"32\"\n" +
" android:compileSdkVersionCodename=\"12\"\n" +
" app:UNK_ATTR0x7f0501ab=\"0x00000005\"\n" +
" package=\"com.example.package\"\n" +
" platformBuildVersionCode=\"32\"\n" +
" platformBuildVersionName=\"12\"\n" +
" style=\"@android:style/Widget\" xmlns:android=\"http://schemas.android.com/apk/res/android\">\n" +
" platformBuildVersionName=\"duplicate\"\n" +
" style=\"@android:style/Widget\"" +
" xmlns:app=\"http://schemas.android.com/apk/res-auto\""+
" xmlns:android=\"http://schemas.android.com/apk/res/android\">\n" +
" <uses-sdk android:minSdkVersion=\"21\"\n" +
" android:targetSdkVersion=\"32\" />\n" +
" <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"\n" +
Expand Down

0 comments on commit 092f2af

Please sign in to comment.