use of com.android.bundle.Targeting.ApkTargeting in project bundletool by google.
the class TargetingUtilsTest method apkMultiAbiTargeting_byAbiAliasAndAlternativesSet.
@Test
public void apkMultiAbiTargeting_byAbiAliasAndAlternativesSet() {
ApkTargeting expectedTargeting = ApkTargeting.newBuilder().setMultiAbiTargeting(SINGLE_ABI_WITH_ALTERNATIVES).build();
assertThat(TargetingUtils.apkMultiAbiTargeting(AbiAlias.X86, ImmutableSet.of(ARMEABI_V7A, ARM64_V8A))).ignoringRepeatedFieldOrder().isEqualTo(expectedTargeting);
}
use of com.android.bundle.Targeting.ApkTargeting in project bundletool by google.
the class TargetingUtilsTest method apkMultiAbiTargeting_byAbiAlias.
@Test
public void apkMultiAbiTargeting_byAbiAlias() {
ApkTargeting expectedTargeting = ApkTargeting.newBuilder().setMultiAbiTargeting(SINGLE_ABI_NO_ALTERNATIVES).build();
assertThat(TargetingUtils.apkMultiAbiTargeting(X86)).isEqualTo(expectedTargeting);
}
use of com.android.bundle.Targeting.ApkTargeting in project bundletool by google.
the class TargetingUtilsTest method apkMultiAbiTargetingFromAllTergeting.
@Test
public void apkMultiAbiTargetingFromAllTergeting() {
ImmutableSet<ImmutableSet<AbiAlias>> allTargeting = ImmutableSet.of(ImmutableSet.of(ARMEABI_V7A), ImmutableSet.of(ARM64_V8A), ImmutableSet.of(X86));
ApkTargeting expectedTargeting = ApkTargeting.newBuilder().setMultiAbiTargeting(SINGLE_ABI_WITH_ALTERNATIVES).build();
assertThat(TargetingUtils.apkMultiAbiTargetingFromAllTargeting(ImmutableSet.of(X86), allTargeting)).ignoringRepeatedFieldOrder().isEqualTo(expectedTargeting);
}
use of com.android.bundle.Targeting.ApkTargeting in project bundletool by google.
the class MergingUtilsTest method mergeShardTargetings_equalDensities_ok.
@Test
public void mergeShardTargetings_equalDensities_ok() {
ApkTargeting targeting = apkDensityTargeting(DensityAlias.HDPI);
ApkTargeting merged = MergingUtils.mergeShardTargetings(targeting, targeting);
assertThat(merged).isEqualTo(targeting);
assertThat(merged.hasAbiTargeting()).isFalse();
}
use of com.android.bundle.Targeting.ApkTargeting in project bundletool by google.
the class MergingUtilsTest method mergeShardTargetings_firstAbiSecondDensity_ok.
@Test
public void mergeShardTargetings_firstAbiSecondDensity_ok() {
ApkTargeting targeting1 = apkAbiTargeting(AbiAlias.X86);
ApkTargeting targeting2 = apkDensityTargeting(DensityAlias.HDPI);
ApkTargeting merged = MergingUtils.mergeShardTargetings(targeting1, targeting2);
assertThat(merged).isEqualTo(ApkTargeting.newBuilder().setAbiTargeting(abiTargeting(AbiAlias.X86)).setScreenDensityTargeting(screenDensityTargeting(DensityAlias.HDPI)).build());
}
Aggregations