use of com.android.tools.build.bundletool.model.ZipPath in project bundletool by google.
the class BundleFilesValidatorTest method validateApexFile_repeatingAbis_throws.
@Test
public void validateApexFile_repeatingAbis_throws() throws Exception {
ZipPath repeatingAbisFile = ZipPath.create("apex/x86.x86_64.x86.img");
InvalidBundleException e = assertThrows(InvalidBundleException.class, () -> new BundleFilesValidator().validateModuleFile(repeatingAbisFile));
assertThat(e).hasMessageThat().contains("Repeating architectures in APEX system image file");
}
use of com.android.tools.build.bundletool.model.ZipPath in project bundletool by google.
the class BundleFilesValidatorTest method validateDexFile_valid_success.
@Test
public void validateDexFile_valid_success() throws Exception {
ZipPath dexFile = ZipPath.create("dex/classes.dex");
new BundleFilesValidator().validateModuleFile(dexFile);
}
use of com.android.tools.build.bundletool.model.ZipPath in project bundletool by google.
the class BundleFilesValidatorTest method validateLibFile_nonSoExtension_throws.
@Test
public void validateLibFile_nonSoExtension_throws() throws Exception {
ZipPath nonSoFile = ZipPath.create("lib/x86/libX.dat");
InvalidBundleException e = assertThrows(InvalidBundleException.class, () -> new BundleFilesValidator().validateModuleFile(nonSoFile));
assertThat(e).hasMessageThat().contains("Files under lib/ must have .so extension");
}
use of com.android.tools.build.bundletool.model.ZipPath in project bundletool by google.
the class BundleFilesValidatorTest method validateWrapSh_valid_success.
@Test
public void validateWrapSh_valid_success() throws Exception {
ZipPath libFile = ZipPath.create("lib/x86/wrap.sh");
new BundleFilesValidator().validateModuleFile(libFile);
}
use of com.android.tools.build.bundletool.model.ZipPath in project bundletool by google.
the class BundleFilesValidatorTest method validateApexFile_nonImgExtension_throws.
@Test
public void validateApexFile_nonImgExtension_throws() throws Exception {
ZipPath nonImgFile = ZipPath.create("apex/x86.dat");
InvalidBundleException e = assertThrows(InvalidBundleException.class, () -> new BundleFilesValidator().validateModuleFile(nonImgFile));
assertThat(e).hasMessageThat().contains("Files under apex/ must have .img extension");
}
Aggregations