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

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


   
    StubMethodCallInstruction instr = new StubMethodCallInstruction("mName", new StubVariable(), params, new StubMethodBinding(rBinding, vBindings), new StubVariable())
   
    EndOfMethodOp op = new EndOfMethodOp(null, null, null, null, null, false);
   
    ConsList<Binding> map = op.matches(new EqualityOnlyTypeHierarchy(), null, instr);

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


 
    Pair<ReturnInstruction, Method> pair = getRetAndMethod(var, params, new StubVariable());
   
    EndOfMethodOp op = new EndOfMethodOp(null, null, null, null, null, false);

    ConsList<Binding> map = op.matches(new EqualityOnlyTypeHierarchy(), pair.snd(), pair.fst());
   
    assertTrue(map != null);
    assertEquals(1, map.size());
    assertTrue(map.contains(new Binding(Constraint.RECEIVER, var)));
 
View Full Code Here

 
    Pair<ReturnInstruction, Method> pair = getRetAndMethod(new StubVariable(), params, var);
   
    EndOfMethodOp op = new EndOfMethodOp(null, null, null, null, "Foo", true);

    ConsList<Binding> map = op.matches(new EqualityOnlyTypeHierarchy(), pair.snd(), pair.fst());
   
    assertTrue(map != null);
    assertEquals(1, map.size());
    assertTrue(map.contains(new Binding(Constraint.RESULT, var)));
 
View Full Code Here

 
    Pair<ReturnInstruction, Method> pair = getRetAndMethod(var, params, retVar);
   
    EndOfMethodOp op = new EndOfMethodOp(null, null, null, null, "Foo", false);

    ConsList<Binding> map = op.matches(new EqualityOnlyTypeHierarchy(), pair.snd(), pair.fst());
   
    assertTrue(map != null);
    assertEquals(2, map.size());
    assertTrue(map.contains(new Binding(Constraint.RESULT, retVar)));
    assertTrue(map.contains(new Binding(Constraint.RECEIVER, var)));
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.