Package com.google.test.metric

Examples of com.google.test.metric.ClassCost.link()


  private ClassCost classCost(String name, int cost) {
    List<MethodCost> methods = new ArrayList<MethodCost>();
    methods.add(new MethodCost("method_" + cost, 1, cost));
    ClassCost classCost = new ClassCost(name, methods);
    classCost.link(new CostModel(1, 1));
    return classCost;
  }

  public void testPrintSummary() throws Exception {
    report.addClassCost(classCost("c.g.t.A", 1));
View Full Code Here


    ClassCost classCost0 = new ClassCost("FAKE_classInfo0", new ArrayList<MethodCost>());
    ClassCost classCost1 = new ClassCost("FAKE_classInfo1", methodCosts1);
    ClassCost classCost2 = new ClassCost("FAKE_classInfo2", methodCosts2);
    classCost0.link(context);
    classCost1.link(context);
    classCost2.link(context);
    printer.addClassCost(classCost0);
    printer.addClassCost(classCost1);
    printer.addClassCost(classCost2);
    printer.printFooter();
    assertStringEquals("\nTestability cost for FAKE_classInfo2 [ cost = 2 ] [ 2 TCC, 0 TGC ]\n" +
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.