Package hydra.test

Interface Transform


  • public interface Transform
    Transform test cases for code generation, filtering to tests that can be compiled to target languages
    • Method Detail

      • addGenerationPrefix

        static ModuleName addGenerationPrefix​(ModuleName ns_)
        Add generation namespace prefix
      • buildConvertCaseCall

        static Term buildConvertCaseCall​(CaseConvention fromConv,
                                         CaseConvention toConv,
                                         java.lang.String input_)
        Build a Term representing a convertCase function call
      • buildTopologicalSortCall

        static Term buildTopologicalSortCall​(java.util.List<Pair<java.lang.Integer,​java.util.List<java.lang.Integer>>> adjList)
        Build a Term representing a topologicalSort function call
      • buildTopologicalSortSCCCall

        static Term buildTopologicalSortSCCCall​(java.util.List<Pair<java.lang.Integer,​java.util.List<java.lang.Integer>>> adjList)
        Build a Term representing a topologicalSortComponents function call
      • collectTestCases

        static java.util.List<TestCaseWithMetadata> collectTestCases​(TestGroup tg)
        Collect all test cases from a test group (flattening hierarchy)
      • encodeAdjacencyList

        static Term encodeAdjacencyList​(java.util.List<Pair<java.lang.Integer,​java.util.List<java.lang.Integer>>> pairs)
        Encode an adjacency list as a Term
      • encodeCaseConvention

        static Term encodeCaseConvention​(CaseConvention conv)
        Encode CaseConvention as a Term (unit variant)
      • encodeEitherListList

        static Term encodeEitherListList​(Either<java.util.List<java.util.List<java.lang.Integer>>,​java.util.List<java.lang.Integer>> e)
        Encode Either [[Int]] [Int] as a Term
      • encodeInt

        static Term encodeInt​(java.lang.Integer n)
        Encode an Int as a Term
      • encodeIntList

        static Term encodeIntList​(java.util.List<java.lang.Integer> ints)
        Encode [Int] as a Term
      • encodeListList

        static Term encodeListList​(java.util.List<java.util.List<java.lang.Integer>> lists)
        Encode [[Int]] as a Term
      • transformModule

        static Module transformModule​(Module m)
        Transform module with generation namespace
      • transformTestCase

        static <T0> Optional<T0> transformTestCase​(T0 tcm)
        Pass through test cases unchanged
      • transformToCompiledTests

        static Optional<TestGroup> transformToCompiledTests​(TestGroup tg)
        Transform test group hierarchy to only include delegated evaluation tests