Package edu.cmu.cs.fusion.constraint

Examples of edu.cmu.cs.fusion.constraint.Operation


  @Test
  public void testEOMEmpty() throws ParseException {
    String string = "EOM";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a EOM, but is " + op.getClass().getCanonicalName(), op instanceof EndOfMethodOp);
   
    EndOfMethodOp invoke = (EndOfMethodOp)op;
       
    FreeVars vars = invoke.getFreeVariables();
    Assert.assertEquals("Wrong number of free vars", 0, vars.size());   
View Full Code Here


  @Test
  public void testEOMNonStaticReturns() throws ParseException {
    String string = "EOM: Foo.bar(..) : Baz";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a EOM, but is " + op.getClass().getCanonicalName(), op instanceof EndOfMethodOp);
   
    EndOfMethodOp invoke = (EndOfMethodOp)op;
       
    FreeVars vars = invoke.getFreeVariables();
    Assert.assertEquals("Wrong number of free vars", 2, vars.size());   
View Full Code Here

  @Test
  public void testEOMStaticReturns() throws ParseException {
    String string = "EOM: static Foo.bar(..) : Baz";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a EOM, but is " + op.getClass().getCanonicalName(), op instanceof EndOfMethodOp);
   
    EndOfMethodOp invoke = (EndOfMethodOp)op;
       
    FreeVars vars = invoke.getFreeVariables();
    Assert.assertEquals("Wrong number of free vars", 1, vars.size());     
View Full Code Here

  @Test
  public void testBOMEmpty() throws ParseException {
    String string = "BOM";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a BOM, but is " + op.getClass().getCanonicalName(), op instanceof BeginOfMethodOp);
   
    BeginOfMethodOp invoke = (BeginOfMethodOp)op;
       
    FreeVars vars = invoke.getFreeVariables();
    Assert.assertEquals("Wrong number of free vars", 0, vars.size());     
View Full Code Here

  @Test
  public void testBOMWCParams() throws ParseException {
    String string = "BOM: Foo.Bar(..)";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a BOM, but is " + op.getClass().getCanonicalName(), op instanceof BeginOfMethodOp);
   
    BeginOfMethodOp invoke = (BeginOfMethodOp)op;
       
    FreeVars vars = invoke.getFreeVariables();
    Assert.assertEquals("Wrong number of free vars", 1, vars.size());   
View Full Code Here

  @Test
  public void testBOMWCName() throws ParseException {
    String string = "BOM: Foo.*()";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a BOM, but is " + op.getClass().getCanonicalName(), op instanceof BeginOfMethodOp);
   
    BeginOfMethodOp invoke = (BeginOfMethodOp)op;
       
    FreeVars vars = invoke.getFreeVariables();
    Assert.assertEquals("Wrong number of free vars", 1, vars.size());   
View Full Code Here

  @Test
  public void testBOMWCReceiver() throws ParseException {
    String string = "BOM: *.Name(Bar bar, Baz baz)";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a BOM, but is " + op.getClass().getCanonicalName(), op instanceof BeginOfMethodOp);
   
    BeginOfMethodOp invoke = (BeginOfMethodOp)op;
       
    FreeVars vars = invoke.getFreeVariables();
    Assert.assertEquals("Wrong number of free vars", 3, vars.size());
View Full Code Here

  @Test
  public void testBOMStatic() throws ParseException {
    String string = "BOM: static Foo.Name(Bar bar, Baz baz) : Baz";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a BOM, but is " + op.getClass().getCanonicalName(), op instanceof BeginOfMethodOp);
   
    BeginOfMethodOp invoke = (BeginOfMethodOp)op;
       
    FreeVars vars = invoke.getFreeVariables();
    Assert.assertEquals("Wrong number of free vars", 2, vars.size());   
View Full Code Here

  @Test
  public void testMethodInvocation0() throws ParseException {
    String string = "Foo.mName() : Baz";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a MethodInvoke, but is " + op.getClass().getCanonicalName(), op instanceof MethodInvocationOp);
   
    MethodInvocationOp invoke = (MethodInvocationOp)op;
       
    FreeVars vars = invoke.getFreeVariables();
    Assert.assertEquals("Wrong number of free vars", 2, vars.size());
View Full Code Here

  @Test
  public void testMethodInvocation1() throws ParseException {
    String string = "Foo.mName(Bar bar) : Baz";
   
    FPLParser parser = new FPLParser(string, null, new StubIType());
    Operation op = parser.operation();
   
    Assert.assertTrue("Parsed predicate should be a MethodInvoke, but is " + op.getClass().getCanonicalName(), op instanceof MethodInvocationOp);
   
    MethodInvocationOp invoke = (MethodInvocationOp)op;
       
    FreeVars vars = invoke.getFreeVariables();
    Assert.assertEquals("Wrong number of free vars", 3, vars.size());
View Full Code Here

TOP

Related Classes of edu.cmu.cs.fusion.constraint.Operation

Copyright © 2018 www.massapicom. 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.