Package edu.cmu.cs.fusion.test

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


  public void testRelPred() throws ParseException {
    String string = "Foo(a, b)";
    RelationsEnvironment env = new RelationsEnvironment();
    env.addRelation(new Relation("Foo", new String[] {"Bar", "Baz"}));
   
    FPLParser parser = new FPLParser(string, env, new StubIType());
    Predicate pred = parser.expression();
   
    Assert.assertTrue("Parsed predicate should be a RelationshipPredicate, but is " + pred.getClass().getCanonicalName(), pred instanceof RelationshipPredicate);
   
    RelationshipPredicate val = (RelationshipPredicate)pred;
View Full Code Here


  public void testNegRelPred() throws ParseException {
    String string = "!Foo(a, b)";
    RelationsEnvironment env = new RelationsEnvironment();
    env.addRelation(new Relation("Foo", new String[] {"Bar", "Baz"}));

    FPLParser parser = new FPLParser(string, env, new StubIType());
    Predicate pred = parser.expression();
   
    Assert.assertTrue("Parsed predicate should be a RelationshipPredicate, but is " + pred.getClass().getCanonicalName(), pred instanceof RelationshipPredicate);
   
    RelationshipPredicate val = (RelationshipPredicate)pred;
View Full Code Here

public class ParseOperations
  @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;
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;
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;
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;
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;
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;
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;
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;
View Full Code Here

TOP

Related Classes of edu.cmu.cs.fusion.test.StubIType

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.