Search in sources :

Example 1 with ProfileFunExpr

use of suite.jdk.gen.FunExprM.ProfileFunExpr in project suite by stupidsing.

the class FunCreatorTest method testProfile.

@Test
public void testProfile() {
    Iterate<FunExpr> fun = i -> (ProfileFunExpr) f.profile(f.int_(1));
    IntSource instance = LambdaInstance.of(IntSource.class, fun).newFun();
    assertEquals(1, instance.source());
    Dump.out(instance);
}
Also used : Reference(suite.node.Reference) Suite(suite.Suite) Flt_Flt(suite.primitive.Flt_Flt) Dump(suite.inspect.Dump) PrintlnFunExpr(suite.jdk.gen.FunExprM.PrintlnFunExpr) Source(suite.util.FunUtil.Source) Assert.assertTrue(org.junit.Assert.assertTrue) TermOp(suite.node.io.TermOp) Test(org.junit.Test) Fun(suite.util.FunUtil.Fun) ProfileFunExpr(suite.jdk.gen.FunExprM.ProfileFunExpr) Tree(suite.node.Tree) Node(suite.node.Node) IntSource(suite.primitive.IntPrimitives.IntSource) Iterate(suite.util.FunUtil.Iterate) BiPredicate(java.util.function.BiPredicate) LambdaInstance(suite.jdk.lambda.LambdaInstance) Map(java.util.Map) Type(org.apache.bcel.generic.Type) FunExpr(suite.jdk.gen.FunExpression.FunExpr) Int(suite.node.Int) LambdaInterface(suite.jdk.lambda.LambdaInterface) Int_Int(suite.primitive.Int_Int) Assert.assertEquals(org.junit.Assert.assertEquals) ProfileFunExpr(suite.jdk.gen.FunExprM.ProfileFunExpr) IntSource(suite.primitive.IntPrimitives.IntSource) PrintlnFunExpr(suite.jdk.gen.FunExprM.PrintlnFunExpr) ProfileFunExpr(suite.jdk.gen.FunExprM.ProfileFunExpr) FunExpr(suite.jdk.gen.FunExpression.FunExpr) Test(org.junit.Test)

Example 2 with ProfileFunExpr

use of suite.jdk.gen.FunExprM.ProfileFunExpr in project suite by stupidsing.

the class FunFactory method profile.

public FunExpr profile(FunExpr do_) {
    ProfileFunExpr expr = new ProfileFunExpr();
    expr.do_ = do_;
    return expr;
}
Also used : ProfileFunExpr(suite.jdk.gen.FunExprM.ProfileFunExpr)

Aggregations

ProfileFunExpr (suite.jdk.gen.FunExprM.ProfileFunExpr)2 Map (java.util.Map)1 BiPredicate (java.util.function.BiPredicate)1 Type (org.apache.bcel.generic.Type)1 Assert.assertEquals (org.junit.Assert.assertEquals)1 Assert.assertTrue (org.junit.Assert.assertTrue)1 Test (org.junit.Test)1 Suite (suite.Suite)1 Dump (suite.inspect.Dump)1 PrintlnFunExpr (suite.jdk.gen.FunExprM.PrintlnFunExpr)1 FunExpr (suite.jdk.gen.FunExpression.FunExpr)1 LambdaInstance (suite.jdk.lambda.LambdaInstance)1 LambdaInterface (suite.jdk.lambda.LambdaInterface)1 Int (suite.node.Int)1 Node (suite.node.Node)1 Reference (suite.node.Reference)1 Tree (suite.node.Tree)1 TermOp (suite.node.io.TermOp)1 Flt_Flt (suite.primitive.Flt_Flt)1 IntSource (suite.primitive.IntPrimitives.IntSource)1