use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class DoubleArrayAsListTest method suite.
// suite
@GwtIncompatible
public static Test suite() {
List<ListTestSuiteBuilder<Double>> builders = ImmutableList.of(ListTestSuiteBuilder.using(new DoublesAsListGenerator()).named("Doubles.asList"), ListTestSuiteBuilder.using(new DoublsAsListHeadSubListGenerator()).named("Doubles.asList, head subList"), ListTestSuiteBuilder.using(new DoublesAsListTailSubListGenerator()).named("Doubles.asList, tail subList"), ListTestSuiteBuilder.using(new DoublesAsListMiddleSubListGenerator()).named("Doubles.asList, middle subList"));
TestSuite suite = new TestSuite();
for (ListTestSuiteBuilder<Double> builder : builders) {
suite.addTest(builder.withFeatures(CollectionSize.ONE, CollectionSize.SEVERAL, CollectionFeature.RESTRICTS_ELEMENTS, ListFeature.SUPPORTS_SET).createTestSuite());
}
return suite;
}
use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class IntArrayAsListTest method suite.
// suite
@GwtIncompatible
public static Test suite() {
List<ListTestSuiteBuilder<Integer>> builders = ImmutableList.of(ListTestSuiteBuilder.using(new IntsAsListGenerator()).named("Ints.asList"), ListTestSuiteBuilder.using(new IntsAsListHeadSubListGenerator()).named("Ints.asList, head subList"), ListTestSuiteBuilder.using(new IntsAsListTailSubListGenerator()).named("Ints.asList, tail subList"), ListTestSuiteBuilder.using(new IntsAsListMiddleSubListGenerator()).named("Ints.asList, middle subList"));
TestSuite suite = new TestSuite();
for (ListTestSuiteBuilder<Integer> builder : builders) {
suite.addTest(builder.withFeatures(CollectionSize.ONE, CollectionSize.SEVERAL, CollectionFeature.RESTRICTS_ELEMENTS, ListFeature.SUPPORTS_SET).createTestSuite());
}
return suite;
}
use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class InternetDomainNameTest method testNulls.
// NullPointerTester
@GwtIncompatible
public void testNulls() {
final NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(InternetDomainName.class);
tester.testAllPublicInstanceMethods(InternetDomainName.from("google.com"));
}
use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class LongMathTest method testDivNonZero.
// TODO
@GwtIncompatible
// TODO(cpovirk): File BigDecimal.divide() rounding bug.
@AndroidIncompatible
public void testDivNonZero() {
for (long p : NONZERO_LONG_CANDIDATES) {
for (long q : NONZERO_LONG_CANDIDATES) {
for (RoundingMode mode : ALL_SAFE_ROUNDING_MODES) {
long expected = new BigDecimal(valueOf(p)).divide(new BigDecimal(valueOf(q)), 0, mode).longValue();
long actual = LongMath.divide(p, q, mode);
if (expected != actual) {
failFormat("expected divide(%s, %s, %s) = %s; got %s", p, q, mode, expected, actual);
}
}
}
}
}
use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class LongMathTest method testCheckedPow.
// TODO
@GwtIncompatible
public void testCheckedPow() {
for (long b : ALL_LONG_CANDIDATES) {
for (int exp : EXPONENTS) {
BigInteger expectedResult = valueOf(b).pow(exp);
boolean expectedSuccess = fitsInLong(expectedResult);
try {
assertEquals(expectedResult.longValue(), LongMath.checkedPow(b, exp));
assertTrue(expectedSuccess);
} catch (ArithmeticException e) {
if (expectedSuccess) {
failFormat("expected checkedPow(%s, %s) = %s; got ArithmeticException", b, exp, expectedResult);
}
}
}
}
}
Aggregations