Class ByteCodeWriterTck

java.lang.Object
io.micronaut.sourcegen.bytecode.tck.AbstractByteCodeWriterTck
io.micronaut.sourcegen.bytecode.tck.ByteCodeWriterTck

public abstract class ByteCodeWriterTck extends AbstractByteCodeWriterTck
The behaviour every bytecode backend must provide, asserted through the classes a backend writes rather than through the bytecode it emits, so that the same tests hold for any backend.

A backend runs the TCK by extending this class and implementing AbstractByteCodeWriterTck.write(ObjectDef). Assertions about a particular backend's encoding, such as the exact instructions it selects or the fallbacks it offers, belong in that backend's own tests.

Since:
2.2
  • Constructor Details

    • ByteCodeWriterTck

      public ByteCodeWriterTck()
  • Method Details

    • marksEveryGeneratedTypeWithAClassRetainedAnnotation

      @Test public void marksEveryGeneratedTypeWithAClassRetainedAnnotation()
    • doesNotDuplicateAnExplicitGeneratedMarker

      @Test public void doesNotDuplicateAnExplicitGeneratedMarker()
    • callsAVariableArityMethodWithMoreArgumentsThanItsFixedArityOverloadsTake

      @Test public void callsAVariableArityMethodWithMoreArgumentsThanItsFixedArityOverloadsTake() throws Exception
      Throws:
      Exception
    • writesEveryIntegerMathOperationAndWidePrimitiveOperations

      @Test public void writesEveryIntegerMathOperationAndWidePrimitiveOperations() throws Exception
      Throws:
      Exception
    • writesAllComparisonsForIntegralAndFloatingPointValues

      @Test public void writesAllComparisonsForIntegralAndFloatingPointValues() throws Exception
      Throws:
      Exception
    • writesCastsBoxingNullChecksEqualityInstanceOfAndArrays

      @Test public void writesCastsBoxingNullChecksEqualityInstanceOfAndArrays() throws Exception
      Throws:
      Exception
    • writesReflectedGenericBridgeAndGenericSignatures

      @Test public void writesReflectedGenericBridgeAndGenericSignatures() throws Exception
      Throws:
      Exception
    • verifiesHierarchyFromGeneratedModelDefinitions

      @Test public void verifiesHierarchyFromGeneratedModelDefinitions() throws Exception
      Throws:
      Exception
    • writesEmptyWideGenericAndBridgedRecords

      @Test public void writesEmptyWideGenericAndBridgedRecords() throws Exception
      Throws:
      Exception
    • writesExplicitSuperConstructorsAndObjectCreation

      @Test public void writesExplicitSuperConstructorsAndObjectCreation() throws Exception
      Throws:
      Exception
    • writesBooleanCompositionConditionalExpressionsAndArraySizes

      @Test public void writesBooleanCompositionConditionalExpressionsAndArraySizes() throws Exception
      Throws:
      Exception
    • writesCatchVariablesThrowsAndDeclarationMetadata

      @Test public void writesCatchVariablesThrowsAndDeclarationMetadata() throws Exception
      Throws:
      Exception
    • writesGenericRecordSignaturesAndRecordsWithAnAdditionalConstructor

      @Test public void writesGenericRecordSignaturesAndRecordsWithAnAdditionalConstructor() throws Exception
      Throws:
      Exception
    • writesSuperCallsAndSuperConstructorDelegation

      @Test public void writesSuperCallsAndSuperConstructorDelegation() throws Exception
      Throws:
      Exception
    • writesArrayConstantsAndMultiDimensionalArrays

      @Test public void writesArrayConstantsAndMultiDimensionalArrays() throws Exception
      Throws:
      Exception
    • writesVoidMethodsThatReturnAnExpression

      @Test public void writesVoidMethodsThatReturnAnExpression() throws Exception
      Throws:
      Exception
    • writesConstructorsWhoseSuperCallUsesAnEarlierLocal

      @Test public void writesConstructorsWhoseSuperCallUsesAnEarlierLocal() throws Exception
      Throws:
      Exception
    • writesBoxedConstantsSmallPrimitivesAndPrimitiveHashCodes

      @Test public void writesBoxedConstantsSmallPrimitivesAndPrimitiveHashCodes() throws Exception
      Throws:
      Exception
    • writesInterfacesWithAbstractDefaultAndStaticMethods

      @Test public void writesInterfacesWithAbstractDefaultAndStaticMethods() throws Exception
      Throws:
      Exception
    • writesEnums

      @Test public void writesEnums() throws Exception
      Throws:
      Exception
    • writesConstructorDelegationWithoutRepeatingFieldInitializers

      @Test public void writesConstructorDelegationWithoutRepeatingFieldInitializers() throws Exception
      Throws:
      Exception
    • writesSuperConstructorCallsThatNameTheSuperType

      @Test public void writesSuperConstructorCallsThatNameTheSuperType() throws Exception
      Throws:
      Exception
    • writesSuperCallsToASuperclassMethodAndAnInterfaceDefaultMethod

      @Test public void writesSuperCallsToASuperclassMethodAndAnInterfaceDefaultMethod() throws Exception
      Throws:
      Exception
    • writesNamesContainingDollarSigns

      @Test public void writesNamesContainingDollarSigns() throws Exception
      Throws:
      Exception
    • writesInstanceOfANestedType

      @Test public void writesInstanceOfANestedType() throws Exception
      Throws:
      Exception
    • writesAccessToAFieldOfAnotherType

      @Test public void writesAccessToAFieldOfAnotherType() throws Exception
      Throws:
      Exception
    • writesArrayAnnotationMembersAndNestedArrayInitializers

      @Test public void writesArrayAnnotationMembersAndNestedArrayInitializers() throws Exception
      Throws:
      Exception
    • writesLambdasDeclaredInsideNestedBlocks

      @Test public void writesLambdasDeclaredInsideNestedBlocks() throws Exception
      Throws:
      Exception
    • writesThisInsideANestedBlockOfALambdaBody

      @Test public void writesThisInsideANestedBlockOfALambdaBody() throws Exception
      Throws:
      Exception