Package edu.cmu.cs.fusion.constraint.operations

Examples of edu.cmu.cs.fusion.constraint.operations.MethodInvocationOp.matches()


    NewObjectInstruction instr = new StubNewObjectInstruction(params, new StubMethodBinding(new NamedTypeBinding("Foo"), vBindings), new StubVariable())
    SpecVar[] vars = new SpecVar[] {utils.getVar(0), utils.getVar(1)};
    String[] vTypes = new String[] {"Bar", "Baz"};
    MethodInvocationOp op = new MethodInvocationOp("testtesttest", "Foo", vars, vTypes, "void", false);
   
    ConsList<Binding> map = op.matches(new EqualityOnlyTypeHierarchy(), null, instr);

    assertTrue(map == null);
  }
 
  @Test
View Full Code Here


    MethodCallInstruction instr = getMCI(new StubVariable(), params, new StubVariable());
    SpecVar[] vars = new SpecVar[] {utils.getVar(0), utils.getVar(1)};
    String[] vTypes = new String[] {"Bar", "Baz"};
    MethodInvocationOp op = new MethodInvocationOp("testtesttest", "Foo", vars, vTypes, "Bazaz", false);
   
    ConsList<Binding> map = op.matches(new EqualityOnlyTypeHierarchy(), null, instr);
   
    assertTrue(map == null);
  }
 
  @Test
View Full Code Here

    MethodCallInstruction instr = getMCI(new StubVariable(), params, new StubVariable());
    SpecVar[] vars = new SpecVar[] {utils.getVar(0), utils.getVar(1)};
    String[] vTypes = new String[] {"Bar", "Baz"};
    MethodInvocationOp op = new MethodInvocationOp("mName", "Foo2", vars, vTypes, "Bazaz", false);
   
    ConsList<Binding> map = op.matches(new EqualityOnlyTypeHierarchy(), null, instr);
   
    assertTrue(map == null);
  }

  @Test
View Full Code Here

    MethodCallInstruction instr = getMCI(new StubVariable(), params, new StubVariable());
    SpecVar[] vars = new SpecVar[] {utils.getVar(0), utils.getVar(1)};
    String[] vTypes = new String[] {"Bar", "Baz2"};
    MethodInvocationOp op = new MethodInvocationOp("mName", "Foo", vars, vTypes, "Bazaz", false);
   
    ConsList<Binding> map = op.matches(new EqualityOnlyTypeHierarchy(), null, instr);
   
    assertTrue(map == null)
  }
 
  @Test
View Full Code Here

    MethodCallInstruction instr = getMCI(new StubVariable(), params, new StubVariable());
    SpecVar[] vars = new SpecVar[] {utils.getVar(0), utils.getVar(1)};
    String[] vTypes = new String[] {"Bar", "Baz", "blah"};
    MethodInvocationOp op = new MethodInvocationOp("mName", "Foo", vars, vTypes, "Bazaz", false);
   
    ConsList<Binding> map = op.matches(new EqualityOnlyTypeHierarchy(), null, instr);
   
    assertTrue(map == null);
   
  }
 
View Full Code Here

    MethodCallInstruction instr = getMCI(rVar, params, tVar);
    SpecVar[] vars = new SpecVar[] {utils.getVar(0), utils.getVar(1)};
    String[] vTypes = new String[] {"Bar", "Baz"};
    MethodInvocationOp op = new MethodInvocationOp("mName", "Foo", vars, vTypes, "Bazaz", false);
   
    ConsList<Binding> list = op.matches(new EqualityOnlyTypeHierarchy(), null, instr);
   
    assertTrue(list != null);
    assertTrue(list.contains(new Binding(Constraint.RESULT, tVar)));
    assertTrue(list.contains(new Binding(Constraint.RECEIVER, rVar)));
    assertTrue(list.contains(new Binding(utils.getVar(0), p1)));
View Full Code Here

   
    SpecVar[] vars = new SpecVar[] {utils.getVar(0), utils.getVar(1)};
    String[] vTypes = new String[] {"Foo", "Bar"};
    MethodInvocationOp op = new MethodInvocationOp("mName", "Foo", vars, vTypes, "Bar", false);
   
    ConsList<Binding> list = op.matches(new EqualityOnlyTypeHierarchy(), null, instr);
   
    assertTrue(list != null);
    assertTrue(list.contains(new Binding(Constraint.RESULT, tVar)));
    assertTrue(list.contains(new Binding(Constraint.RECEIVER, rVar)));
    assertTrue(list.contains(new Binding(utils.getVar(0), rVar)));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.