Package com.google.test.metric.method.op.stack

Examples of com.google.test.metric.method.op.stack.Return


    /*20*/ decomposer.addOp(new Load(20, new Constant(4, Type.INT)));
    /*21*/ decomposer.addOp(new Store(21, b));
    decomposer.label(l22);
    /*22*/ decomposer.addOp(new Load(22, new Constant(4, Type.INT)));
    /*23*/ decomposer.addOp(new Store(23, b));
    /*24*/ decomposer.addOp(new Return(24, Type.VOID));

    decomposer.done();

    assertEquals("[load 1{int}, store b{int}, load 2{int}, store b{int}]",
        decomposer.getBlock(tryStart).getOperations().toString());
View Full Code Here


    main.addOp(new JSR(0, sub));
    main.addOp(new PutField(0, new FieldInfo(null, "a", Type.INT, false, false,
        false)));

    sub.addOp(new Load(0, new Constant(1, Type.INT)));
    sub.addOp(new Return(0, Type.VOID));

    Stack2Turing converter = new Stack2Turing(main);
    List<Operation> operations = converter.translate();
    assertEquals(1, operations.size());
    assertEquals("null.a{int} <- 1{int}", operations.get(0).toString());
View Full Code Here

  }

  private void _return(final Type type) {
    recorder.add(new Runnable() {
      public void run() {
        block.addOp(new Return(lineNumber, type));
      }
    });
  }
View Full Code Here

TOP

Related Classes of com.google.test.metric.method.op.stack.Return

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.