Package com.google.test.metric.cpp.dom

Examples of com.google.test.metric.cpp.dom.LoopStatement


    finished();
  }

  @Override
  public void beginForStatement() {
    Node node = new LoopStatement();
    parent.addChild(node);
    pushBuilder(new StatementBuilder(node));
  }
View Full Code Here


    finished();
  }

  @Override
  public void beginWhileStatement() {
    Node node = new LoopStatement();
    parent.addChild(node);
    pushBuilder(new StatementBuilder(node));
  }
View Full Code Here

    finished();
  }

  @Override
  public void beginDoStatement() {
    Node node = new LoopStatement();
    parent.addChild(node);
    pushBuilder(new StatementBuilder(node));
  }
View Full Code Here

  }

  public void testForStatement() throws Exception {
    TranslationUnit unit = parse("void foo() { for(;;); }");
    FunctionDefinition functionFoo = unit.getChild(0);
    LoopStatement forStatement = functionFoo.getChild(0);
    assertNotNull(forStatement);
  }
View Full Code Here

  }

  public void testWhileStatement() throws Exception {
    TranslationUnit unit = parse("void foo() { while(true); }");
    FunctionDefinition functionFoo = unit.getChild(0);
    LoopStatement whileStatement = functionFoo.getChild(0);
    assertNotNull(whileStatement);
  }
View Full Code Here

  }

  public void testDoStatement() throws Exception {
    TranslationUnit unit = parse("void foo() { do {} while(true); }");
    FunctionDefinition functionFoo = unit.getChild(0);
    LoopStatement doStatement = functionFoo.getChild(0);
    assertNotNull(doStatement);
  }
View Full Code Here

  }

  public void testWhileInForStatement() throws Exception {
    TranslationUnit unit = parse("void foo() { for(;;) while(true); }");
    FunctionDefinition functionFoo = unit.getChild(0);
    LoopStatement forStatement = functionFoo.getChild(0);
    assertNotNull(forStatement);
    LoopStatement whileStatement = forStatement.getChild(0);
    assertNotNull(whileStatement);
  }
View Full Code Here

  }

  public void testForInDoStatement() throws Exception {
    TranslationUnit unit = parse("void foo() { do for(;;); while(true); }");
    FunctionDefinition functionFoo = unit.getChild(0);
    LoopStatement doStatement = functionFoo.getChild(0);
    assertNotNull(doStatement);
    LoopStatement forStatement = doStatement.getChild(0);
    assertNotNull(forStatement);
  }
View Full Code Here

  }

  public void testForInCompoundDoStatement() throws Exception {
    TranslationUnit unit = parse("void foo() { do { for(;;); } while(true); }");
    FunctionDefinition functionFoo = unit.getChild(0);
    LoopStatement doStatement = functionFoo.getChild(0);
    assertNotNull(doStatement);
    LoopStatement forStatement = doStatement.getChild(0);
    assertNotNull(forStatement);
  }
View Full Code Here

  }

  public void testForInSeveralCompoundStatements() throws Exception {
    TranslationUnit unit = parse("void foo() { {{{ for(;;); }}} }");
    FunctionDefinition functionFoo = unit.getChild(0);
    LoopStatement forStatement = functionFoo.getChild(0);
    assertNotNull(forStatement);
  }
View Full Code Here

TOP

Related Classes of com.google.test.metric.cpp.dom.LoopStatement

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.