Package org.springsource.loaded.test.infra

Examples of org.springsource.loaded.test.infra.FakeMethodVisitor.clearEvents()


    Utils.createLoadsBasedOnDescriptor(fmv, "(D)V", 0);
    assertEquals("visitVarInsn(DLOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(Z)V", 0);
    assertEquals("visitVarInsn(ILOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(J)V", 0);
    assertEquals("visitVarInsn(LLOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(F)V", 0);
    assertEquals("visitVarInsn(FLOAD,0)", fmv.getEvents());
View Full Code Here


    Utils.createLoadsBasedOnDescriptor(fmv, "(Z)V", 0);
    assertEquals("visitVarInsn(ILOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(J)V", 0);
    assertEquals("visitVarInsn(LLOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(F)V", 0);
    assertEquals("visitVarInsn(FLOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(S)V", 0);
    assertEquals("visitVarInsn(ILOAD,0)", fmv.getEvents());
View Full Code Here

    Utils.createLoadsBasedOnDescriptor(fmv, "(J)V", 0);
    assertEquals("visitVarInsn(LLOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(F)V", 0);
    assertEquals("visitVarInsn(FLOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(S)V", 0);
    assertEquals("visitVarInsn(ILOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(I)V", 0);
    assertEquals("visitVarInsn(ILOAD,0)", fmv.getEvents());
View Full Code Here

    Utils.createLoadsBasedOnDescriptor(fmv, "(F)V", 0);
    assertEquals("visitVarInsn(FLOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(S)V", 0);
    assertEquals("visitVarInsn(ILOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(I)V", 0);
    assertEquals("visitVarInsn(ILOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "([[S)V", 0);
    assertEquals("visitVarInsn(ALOAD,0)", fmv.getEvents());
View Full Code Here

    Utils.createLoadsBasedOnDescriptor(fmv, "(S)V", 0);
    assertEquals("visitVarInsn(ILOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(I)V", 0);
    assertEquals("visitVarInsn(ILOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "([[S)V", 0);
    assertEquals("visitVarInsn(ALOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "([[Ljava/lang/String;)V", 0);
    assertEquals("visitVarInsn(ALOAD,0)", fmv.getEvents());
View Full Code Here

    Utils.createLoadsBasedOnDescriptor(fmv, "(I)V", 0);
    assertEquals("visitVarInsn(ILOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "([[S)V", 0);
    assertEquals("visitVarInsn(ALOAD,0)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "([[Ljava/lang/String;)V", 0);
    assertEquals("visitVarInsn(ALOAD,0)", fmv.getEvents());
  }

  @Test
View Full Code Here

  @Test
  public void loads2() {
    FakeMethodVisitor fmv = new FakeMethodVisitor();
    Utils.createLoadsBasedOnDescriptor(fmv, "(BCDS)V", 0);
    assertEquals("visitVarInsn(ILOAD,0) visitVarInsn(ILOAD,1) visitVarInsn(DLOAD,2) visitVarInsn(ILOAD,4)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(Ljava/lang/String;J[I)V", 0);
    assertEquals("visitVarInsn(ALOAD,0) visitVarInsn(LLOAD,1) visitVarInsn(ALOAD,3)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(Ljava/lang/String;J[I)V", 4);
    assertEquals("visitVarInsn(ALOAD,4) visitVarInsn(LLOAD,5) visitVarInsn(ALOAD,7)", fmv.getEvents());
View Full Code Here

    Utils.createLoadsBasedOnDescriptor(fmv, "(BCDS)V", 0);
    assertEquals("visitVarInsn(ILOAD,0) visitVarInsn(ILOAD,1) visitVarInsn(DLOAD,2) visitVarInsn(ILOAD,4)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(Ljava/lang/String;J[I)V", 0);
    assertEquals("visitVarInsn(ALOAD,0) visitVarInsn(LLOAD,1) visitVarInsn(ALOAD,3)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(Ljava/lang/String;J[I)V", 4);
    assertEquals("visitVarInsn(ALOAD,4) visitVarInsn(LLOAD,5) visitVarInsn(ALOAD,7)", fmv.getEvents());
    fmv.clearEvents();
  }
View Full Code Here

    Utils.createLoadsBasedOnDescriptor(fmv, "(Ljava/lang/String;J[I)V", 0);
    assertEquals("visitVarInsn(ALOAD,0) visitVarInsn(LLOAD,1) visitVarInsn(ALOAD,3)", fmv.getEvents());
    fmv.clearEvents();
    Utils.createLoadsBasedOnDescriptor(fmv, "(Ljava/lang/String;J[I)V", 4);
    assertEquals("visitVarInsn(ALOAD,4) visitVarInsn(LLOAD,5) visitVarInsn(ALOAD,7)", fmv.getEvents());
    fmv.clearEvents();
  }

  @Test
  public void generateInstructionsToUnpackArrayAccordingToDescriptor() {
    FakeMethodVisitor fmv = new FakeMethodVisitor();
View Full Code Here

  public void generateInstructionsToUnpackArrayAccordingToDescriptor() {
    FakeMethodVisitor fmv = new FakeMethodVisitor();
    Utils.generateInstructionsToUnpackArrayAccordingToDescriptor(fmv, "(Ljava/lang/String;)V", 1);
    assertEquals("visitVarInsn(ALOAD,1) visitLdcInsn(0) visitInsn(AALOAD) visitTypeInsn(CHECKCAST,java/lang/String)",
        fmv.getEvents());
    fmv.clearEvents();
    Utils.generateInstructionsToUnpackArrayAccordingToDescriptor(fmv, "(I)V", 1);
    assertEquals(
        "visitVarInsn(ALOAD,1) visitLdcInsn(0) visitInsn(AALOAD) visitTypeInsn(CHECKCAST,java/lang/Integer) visitMethodInsn(INVOKEVIRTUAL,java/lang/Integer,intValue,()I)",
        fmv.getEvents());
    fmv.clearEvents();
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.