Examples of EqualityOnlyTypeHierarchy


Examples of edu.cmu.cs.fusion.test.EqualityOnlyTypeHierarchy

    Method method = new Method(new Variable[] {v1, v2}, null, binding);
   
    NewObjectInstruction instr = new StubNewObjectInstruction(params, binding, new StubVariable())
    BeginOfMethodOp op = new BeginOfMethodOp(null, null, null, null, false);
   
    ConsList<Binding> map = op.matches(new EqualityOnlyTypeHierarchy(), method, instr);

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

Examples of edu.cmu.cs.fusion.test.EqualityOnlyTypeHierarchy

    params.add(new StubVariable());

    Pair<EntryInstruction, Method> pair = getEntryAndMethod(new StubVariable(), params);
    BeginOfMethodOp op = new BeginOfMethodOp(null, "OtherName", null, null, false);
   
    ConsList<Binding> map = op.matches(new EqualityOnlyTypeHierarchy(), pair.snd(), pair.fst());
   
    assertTrue(map == null);
  }
View Full Code Here

Examples of edu.cmu.cs.fusion.test.EqualityOnlyTypeHierarchy

    StubVariable var = new StubVariable();

    Pair<EntryInstruction, Method> pair = getEntryAndMethod(var, params);
    BeginOfMethodOp op = new BeginOfMethodOp(null, "name", 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

Examples of edu.cmu.cs.fusion.test.EqualityOnlyTypeHierarchy

    params.add(new StubVariable());

    Pair<EntryInstruction, Method> pair = getEntryAndMethod(new StubVariable(), params);
    BeginOfMethodOp op = new BeginOfMethodOp("Bar", null, null, null, false);
   
    ConsList<Binding> map = op.matches(new EqualityOnlyTypeHierarchy(), pair.snd(), pair.fst());
   
    assertTrue(map == null);
  }
View Full Code Here

Examples of edu.cmu.cs.fusion.test.EqualityOnlyTypeHierarchy

    StubVariable var = new StubVariable();

    Pair<EntryInstruction, Method> pair = getEntryAndMethod(var, params);
    BeginOfMethodOp op = new BeginOfMethodOp("Foo", 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

Examples of edu.cmu.cs.fusion.test.EqualityOnlyTypeHierarchy

    Pair<EntryInstruction, Method> pair = getEntryAndMethod(new StubVariable(), params);
    SpecVar[] vars = new SpecVar[] {utils.getVar(0), utils.getVar(1)};
    String[] vTypes = new String[] {"Bar", "Baz", "blah"};
    BeginOfMethodOp op = new BeginOfMethodOp(null, null, vars, vTypes, false);
   
    ConsList<Binding> list = op.matches(new EqualityOnlyTypeHierarchy(), pair.snd(), pair.fst());
   
    assertTrue(list == null);
  }
View Full Code Here

Examples of edu.cmu.cs.fusion.test.EqualityOnlyTypeHierarchy

    Pair<EntryInstruction, Method> pair = getEntryAndMethod(new StubVariable(), params);
    SpecVar[] vars = new SpecVar[] {utils.getVar(0), utils.getVar(1)};
    String[] vTypes = new String[] {"Bar", "Baz2"};
    BeginOfMethodOp op = new BeginOfMethodOp(null, null, vars, vTypes, false);
   
    ConsList<Binding> list = op.matches(new EqualityOnlyTypeHierarchy(), pair.snd(), pair.fst());
   
    assertTrue(list == null)
  }
View Full Code Here

Examples of edu.cmu.cs.fusion.test.EqualityOnlyTypeHierarchy

    Pair<EntryInstruction, Method> pair = getEntryAndMethod(tVar, params);
    SpecVar[] vars = new SpecVar[] {utils.getVar(0), utils.getVar(1)};
    String[] vTypes = new String[] {"Bar", "Baz"};
    BeginOfMethodOp op = new BeginOfMethodOp("Foo", "name", vars, vTypes, false);
   
    ConsList<Binding> list = op.matches(new EqualityOnlyTypeHierarchy(), pair.snd(), pair.fst());
   
    assertTrue(list != null);
    assertTrue(list.contains(new Binding(Constraint.RECEIVER, tVar)));
    assertTrue(list.contains(new Binding(utils.getVar(0), p1)));
    assertTrue(list.contains(new Binding(utils.getVar(1), p2)));
View Full Code Here

Examples of edu.cmu.cs.fusion.test.EqualityOnlyTypeHierarchy

    Pair<EntryInstruction, Method> pair = getEntryAndMethod(tVar, params);
    SpecVar[] vars = new SpecVar[] {utils.getVar(0), utils.getVar(1)};
    String[] vTypes = new String[] {"Bar", "Baz"};
    BeginOfMethodOp op = new BeginOfMethodOp("Foo", "name", vars, vTypes, true);
   
    ConsList<Binding> list = op.matches(new EqualityOnlyTypeHierarchy(), pair.snd(), pair.fst());
   
    assertTrue(list != null);
    assertTrue(list.contains(new Binding(utils.getVar(0), p1)));
    assertTrue(list.contains(new Binding(utils.getVar(1), p2)));
   
View Full Code Here

Examples of edu.cmu.cs.fusion.test.EqualityOnlyTypeHierarchy

    Pair<EntryInstruction, Method> pair = getEntryAndMethod(tVar, params);
    SpecVar[] vars = new SpecVar[] {utils.getVar(0), utils.getVar(1)};
    String[] vTypes = new String[] {"Bar", "Baz"};
    BeginOfMethodOp op = new BeginOfMethodOp(null, null, vars, vTypes, false);
   
    ConsList<Binding> list = op.matches(new EqualityOnlyTypeHierarchy(), pair.snd(), pair.fst());
   
    assertTrue(list != null);
    assertTrue(list.contains(new Binding(Constraint.RECEIVER, tVar)));
    assertTrue(list.contains(new Binding(utils.getVar(0), tVar)));
    assertTrue(list.contains(new Binding(utils.getVar(1), tVar)));
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.