Package com.google.test.metric.method

Examples of com.google.test.metric.method.Constant


      assertEquals(error, expected[i], actual.get(i));
    }
  }

  private Variable var(Object value) {
    return new Constant(value, JavaType.fromClass(value.getClass()));
  }
View Full Code Here


  @Override
  public List<Variable> apply(List<Variable> input) {
    if (!input.get(0).getType().isObject()) {
      throw new IllegalStateException();
    }
    return list(new Constant("?", type));
  }
View Full Code Here

      }
      if (implicitMethod.getMethodThis() != null) {
        variableState.setInjectable(implicitMethod.getMethodThis());
      }
      setInjectable(implicitMethod.getParameters());
      Constant ret = new Constant("return", JavaType.OBJECT);
      int lineNumber = implicitMethod.getStartingLineNumber();
      recordNonOveridableMethodCall(reason, lineNumber, implicitMethod, implicitMethod
          .getMethodThis(), implicitMethod.getParameters(), ret);
    }
View Full Code Here

      }
      if (method.getMethodThis() != null) {
        variableState.setInjectable(method.getMethodThis());
      }
      setInjectable(method.getParameters());
      Constant returnVariable = new Constant("rootReturn", JavaType.OBJECT);
      applyMethodOperations(-1, method, method.getMethodThis(), method
          .getParameters(), returnVariable);
      return methodCost;
    }
View Full Code Here

  @Override
  public List<Variable> apply(List<Variable> input) {
    if (result == null) {
      return super.apply(input);
    } else {
      return list(new Constant("?", result));
    }
  }
View Full Code Here

  public List<Variable> apply(List<Variable> input) {
    Type array = clazz;
    for (int i = 0; i < dims; i++) {
      array = array.toArray();
    }
    return list(new Constant("?", array));
  }
View Full Code Here

        .fromJava(desc);
    recorder.add(new Runnable() {
      public void run() {
        switch (opcode) {
          case Opcodes.NEW :
            Constant constant = new Constant("new", type);
            block.addOp(new Load(lineNumber, constant));
            break;
          case Opcodes.NEWARRAY :
          case Opcodes.ANEWARRAY :
            block.addOp(new Transform(lineNumber, "newarray", JavaType.INT, null,
View Full Code Here

  }

  public void visitLdcInsn(final Object cst) {
    recorder.add(new Runnable() {
      public void run() {
        block.addOp(new Load(lineNumber, new Constant(cst, JavaType.fromClass(cst
            .getClass()))));
      }
    });
  }
View Full Code Here

  public void visitInsn(final int opcode) {
    switch (opcode) {
      case Opcodes.ACONST_NULL :
        recorder.add(new Runnable() {
          public void run() {
            block.addOp(new Load(lineNumber, new Constant(null, JavaType.OBJECT)));
          }
        });
        break;
      case Opcodes.ICONST_M1 :
      case Opcodes.ICONST_0 :
View Full Code Here

  }

  private void loadConstant(final int constant, final Type type) {
    recorder.add(new Runnable() {
      public void run() {
        block.addOp(new Load(lineNumber, new Constant(constant, type)));
      }
    });
  }
View Full Code Here

TOP

Related Classes of com.google.test.metric.method.Constant

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.