Package com.google.test.metric

Examples of com.google.test.metric.MethodInfo


    }
  }

  public void testTryCatchBlock() throws Exception {

    MethodInfo method = getMethod("method()V", TryCatchFinally.class);
    String operations = method.getOperations().toString();

    assertTrue(operations.contains("b{int} <- 1{int}"));
    assertTrue(operations.contains("b{int} <- 2{int}"));
    assertTrue(operations.contains("b{int} <- 3{int}"));
    assertTrue(operations.contains("b{int} <- 4{int}"));
View Full Code Here


    return classInfo.getMethod(methodName);
  }

  public void testMethodWithIIF() throws Exception {
    Class<IIF> clazz = IIF.class;
    MethodInfo method = getMethod("method()V", clazz);
    assertOperations(method.getOperations(),
        "b{int} <- 1{int}",
        "java.lang.Object.<init>()V",
        clazz.getName() + ".a{java.lang.Object} <- new{java.lang.Object}",
        clazz.getName() + ".a{java.lang.Object} <- null{java.lang.Object}",
        "b{int} <- 2{int}");
View Full Code Here

      a = 5;
    }
  }

  public void testSwitchTable() throws Exception {
    MethodInfo method = getMethod("method()V", SwitchTable.class);
    assertOperations(method.getOperations(), "a{int} <- 0{int}",
        "a{int} <- 1{int}", "a{int} <- 2{int}", "a{int} <- 3{int}",
        "a{int} <- 4{int}", "a{int} <- 5{int}");
  }
View Full Code Here

      return staticText.length();
    }
  }

  public void testCallMethodsLength() throws Exception {
    MethodInfo method = getMethod("length()I", CallMethods.class);
    assertOperations(method.getOperations(), "java.lang.String.length()I", "return ?{int}");
  }
View Full Code Here

    MethodInfo method = getMethod("length()I", CallMethods.class);
    assertOperations(method.getOperations(), "java.lang.String.length()I", "return ?{int}");
  }

  public void testCallMethodsStaticLength() throws Exception {
    MethodInfo method = getMethod("staticLength()I", CallMethods.class);
    assertOperations(method.getOperations(), "java.lang.String.length()I", "return ?{int}");
  }
View Full Code Here

TOP

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

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.