Package com.google.test.metric

Examples of com.google.test.metric.Visibility


  public void testPrivateAccessSpecifier() throws Exception {
    TranslationUnit unit = parse(
        "class A { private: void foo(); };");
    ClassDeclaration classA = unit.getChild(0);
    FunctionDeclaration functionFoo = classA.getChild(0);
    Visibility visibility = functionFoo.getVisibility();
    assertEquals(Visibility.PRIVATE, visibility);
  }
View Full Code Here


  public void testProtectedAccessSpecifier() throws Exception {
    TranslationUnit unit = parse(
        "class A { protected: void foo() {} void bar() {} };");
    ClassDeclaration classA = unit.getChild(0);
    FunctionDefinition functionFoo = classA.getChild(0);
    Visibility visibilityFoo = functionFoo.getVisibility();
    assertEquals(Visibility.PROTECTED, visibilityFoo);
    FunctionDefinition functionBar = classA.getChild(1);
    Visibility visibilityBar = functionBar.getVisibility();
    assertEquals(Visibility.PROTECTED, visibilityBar);
  }
View Full Code Here

TOP

Related Classes of com.google.test.metric.Visibility

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.