/** * Fails if the subject contains any of the given elements. (Duplicates are irrelevant to this * test, which fails if any of the actual elements equal any of the excluded.) */ public void containsNoneOf(int first, int second, int... rest) { check().that(actualList).containsNoneOf(first, second, box(rest)); }
/** * Fails if the subject contains any of the given elements. (Duplicates are irrelevant to this * test, which fails if any of the actual elements equal any of the excluded.) */ public void containsNoneOf(long first, long second, long... rest) { check().that(actualList).containsNoneOf(first, second, box(rest)); }
/** * Checks that a actual iterable contains none of the excluded objects or fails. (Duplicates are * irrelevant to this test, which fails if any of the actual elements equal any of the excluded.) */ public void containsNoneOf( @NullableDecl Object firstExcluded, @NullableDecl Object secondExcluded, @NullableDecl Object... restOfExcluded) { delegate().containsNoneOf(firstExcluded, secondExcluded, restOfExcluded); }
public void testWildcardCaptured_typeVariableDeclaresTypeBound_wildcardAddsNewUpperBound() throws Exception { TypeToken<Counter<? extends Iterable<?>>> type = new TypeToken<Counter<? extends Iterable<?>>>() {}; TypeToken<?> fieldType = type.resolveType(Counter.class.getDeclaredField("counts").getGenericType()); Type[] typeArgs = ((ParameterizedType) fieldType.getType()).getActualTypeArguments(); assertThat(typeArgs).asList().hasSize(1); TypeVariable<?> captured = (TypeVariable<?>) typeArgs[0]; assertThat(captured.getBounds()).asList().contains(Number.class); assertThat(captured.getBounds()) .asList() .containsNoneOf(Object.class, new TypeToken<Iterable<Number>>() {}.getType()); assertThat(new TypeToken<List<? extends Number>>() {}.isSupertypeOf(fieldType)).isTrue(); assertThat(new TypeToken<List<? extends Iterable<?>>>() {}.isSupertypeOf(fieldType)).isTrue(); assertThat(new TypeToken<List<? extends Iterable<Number>>>() {}.isSupertypeOf(fieldType)) .isFalse(); }
/** * Fails if the subject contains any of the given elements. (Duplicates are irrelevant to this * test, which fails if any of the actual elements equal any of the excluded.) */ public void containsNoneOf( @NullableDecl Object first, @NullableDecl Object second, @NullableDecl Object... rest) { check().that(actualList).containsNoneOf(first, second, rest); }
.contains("lib/armeabi/libtest.so"); assertThat(extractPaths(shardsByTargeting.get(armTargeting).getEntries())) .containsNoneOf("lib/x86/libtest.so", "lib/x86_64/libtest.so"); assertThat(extractPaths(shardsByTargeting.get(x86Targeting).getEntries())) .contains("lib/x86/libtest.so"); assertThat(extractPaths(shardsByTargeting.get(x86Targeting).getEntries())) .containsNoneOf("lib/armeabi/libtest.so", "lib/x86_64/libtest.so"); assertThat(extractPaths(shardsByTargeting.get(x64Targeting).getEntries())) .contains("lib/x86_64/libtest.so"); assertThat(extractPaths(shardsByTargeting.get(x64Targeting).getEntries())) .containsNoneOf("lib/armeabi/libtest.so", "lib/x86/libtest.so");
assertThat(extractPaths(shard.getEntries())).contains("lib/armeabi/libtest.so"); assertThat(extractPaths(shard.getEntries())) .containsNoneOf("lib/x86/libtest.so", "lib/x86_64/libtest.so"); break; case X86: assertThat(extractPaths(shard.getEntries())).contains("lib/x86/libtest.so"); assertThat(extractPaths(shard.getEntries())) .containsNoneOf("lib/armeabi/libtest.so", "lib/x86_64/libtest.so"); break; case X86_64: assertThat(extractPaths(shard.getEntries())).contains("lib/x86_64/libtest.so"); assertThat(extractPaths(shard.getEntries())) .containsNoneOf("lib/armeabi/libtest.so", "lib/x86/libtest.so"); break; default:
assertThat(extractPaths(shard.getEntries())).contains("lib/armeabi/libtest.so"); assertThat(extractPaths(shard.getEntries())) .containsNoneOf("lib/x86/libtest.so", "lib/x86_64/libtest.so"); break; case X86: assertThat(extractPaths(shard.getEntries())).contains("lib/x86/libtest.so"); assertThat(extractPaths(shard.getEntries())) .containsNoneOf("lib/armeabi/libtest.so", "lib/x86_64/libtest.so"); break; default:
/** * Fails if the subject contains any of the given elements. (Duplicates are irrelevant to this * test, which fails if any of the actual elements equal any of the excluded.) */ public void containsNoneOf(long first, long second, long... rest) { check().that(actualList).containsNoneOf(first, second, box(rest)); }
/** * Fails if the subject contains any of the given elements. (Duplicates are irrelevant to this * test, which fails if any of the actual elements equal any of the excluded.) */ public void containsNoneOf(int first, int second, int... rest) { check().that(actualList).containsNoneOf(first, second, box(rest)); }
/** * Checks that a actual iterable contains none of the excluded objects or fails. (Duplicates are * irrelevant to this test, which fails if any of the actual elements equal any of the excluded.) */ public void containsNoneOf( @NullableDecl Object firstExcluded, @NullableDecl Object secondExcluded, @NullableDecl Object... restOfExcluded) { delegate().containsNoneOf(firstExcluded, secondExcluded, restOfExcluded); }
/** * Fails if the subject contains any of the given elements. (Duplicates are irrelevant to this * test, which fails if any of the actual elements equal any of the excluded.) */ public void containsNoneOf( @NullableDecl Object first, @NullableDecl Object second, @NullableDecl Object... rest) { check().that(actualList).containsNoneOf(first, second, rest); }
public void testWildcardCaptured_typeVariableDeclaresTypeBound_wildcardAddsNewUpperBound() throws Exception { TypeToken<Counter<? extends Iterable<?>>> type = new TypeToken<Counter<? extends Iterable<?>>>() {}; TypeToken<?> fieldType = type.resolveType( Counter.class.getDeclaredField("counts").getGenericType()); Type[] typeArgs = ((ParameterizedType) fieldType.getType()).getActualTypeArguments(); assertThat(typeArgs).asList().hasSize(1); TypeVariable<?> captured = (TypeVariable<?>) typeArgs[0]; assertThat(captured.getBounds()).asList().contains(Number.class); assertThat(captured.getBounds()).asList() .containsNoneOf(Object.class, new TypeToken<Iterable<Number>>() {}.getType()); assertThat(new TypeToken<List<? extends Number>>() {}.isSupertypeOf(fieldType)).isTrue(); assertThat(new TypeToken<List<? extends Iterable<?>>>() {}.isSupertypeOf(fieldType)).isTrue(); assertThat(new TypeToken<List<? extends Iterable<Number>>>() {}.isSupertypeOf(fieldType)) .isFalse(); }