Search in sources :

Example 6 with DoublePredicate

use of java.util.function.DoublePredicate in project j2objc by google.

the class DoublePredicateTest method testAnd_null.

public void testAnd_null() throws Exception {
    DoublePredicate alwaysTrue = x -> true;
    try {
        alwaysTrue.and(null);
        fail();
    } catch (NullPointerException expected) {
    }
}
Also used : AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TestCase(junit.framework.TestCase) DoublePredicate(java.util.function.DoublePredicate) DoublePredicate(java.util.function.DoublePredicate)

Example 7 with DoublePredicate

use of java.util.function.DoublePredicate in project jdk8u_jdk by JetBrains.

the class MatchOpTest method testDoubleStream.

@Test(dataProvider = "DoubleStreamTestData", dataProviderClass = DoubleStreamTestDataProvider.class)
public void testDoubleStream(String name, TestData.OfDouble data) {
    for (DoublePredicate p : DOUBLE_PREDICATES) {
        setContext("p", p);
        for (Kind kind : Kind.values()) {
            setContext("kind", kind);
            exerciseTerminalOps(data, doubleKinds.get(kind).apply(p));
            exerciseTerminalOps(data, s -> s.filter(dpFalse), doubleKinds.get(kind).apply(p));
            exerciseTerminalOps(data, s -> s.filter(dpEven), doubleKinds.get(kind).apply(p));
        }
    }
}
Also used : DoublePredicate(java.util.function.DoublePredicate) Test(org.testng.annotations.Test)

Aggregations

DoublePredicate (java.util.function.DoublePredicate)7 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)5 TestCase (junit.framework.TestCase)5 Test (org.testng.annotations.Test)2 Math.exp (java.lang.Math.exp)1 Math.log10 (java.lang.Math.log10)1 java.util (java.util)1 DoubleUnaryOperator (java.util.function.DoubleUnaryOperator)1 IntPredicate (java.util.function.IntPredicate)1 NormalDistribution (org.apache.commons.math3.distribution.NormalDistribution)1 LogManager (org.apache.logging.log4j.LogManager)1 Logger (org.apache.logging.log4j.Logger)1 MathUtils (org.broadinstitute.hellbender.utils.MathUtils)1 BaseTest (org.broadinstitute.hellbender.utils.test.BaseTest)1 Assert (org.testng.Assert)1 DataProvider (org.testng.annotations.DataProvider)1