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

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


    finished();
  }

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


  public void testSwitchStatement() throws Exception {
    TranslationUnit unit = parse("void foo() { switch (a) { case 1: break; } }");
    FunctionDefinition functionFoo = unit.getChild(0);
    SwitchStatement switchStatement = functionFoo.getChild(0);
    CaseStatement caseStatement = switchStatement.getChild(0);
    assertNotNull(caseStatement);
  }
View Full Code Here

  public void testSwitchStatementWithDefault() throws Exception {
    TranslationUnit unit = parse("void foo() { switch (a) { case 1: break; default: break; } }");
    FunctionDefinition functionFoo = unit.getChild(0);
    SwitchStatement switchStatement = functionFoo.getChild(0);
    CaseStatement caseStatement = switchStatement.getChild(0);
    BreakStatement breakStatement = caseStatement.getChild(0);
    assertNotNull(breakStatement);
    DefaultStatement defaultStatement = switchStatement.getChild(1);
    breakStatement = defaultStatement.getChild(0);
    assertNotNull(breakStatement);
  }
View Full Code Here

TOP

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

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.