Package hydra.test
Interface Transform
-
public interface TransformTransform test cases for code generation, filtering to tests that can be compiled to target languages
-
-
Method Summary
Static Methods Modifier and Type Method Description static ModuleNameaddGenerationPrefix(ModuleName ns_)Add generation namespace prefixstatic TermbuildConvertCaseCall(CaseConvention fromConv, CaseConvention toConv, java.lang.String input_)Build a Term representing a convertCase function callstatic TermbuildTopologicalSortCall(java.util.List<Pair<java.lang.Integer,java.util.List<java.lang.Integer>>> adjList)Build a Term representing a topologicalSort function callstatic TermbuildTopologicalSortSCCCall(java.util.List<Pair<java.lang.Integer,java.util.List<java.lang.Integer>>> adjList)Build a Term representing a topologicalSortComponents function callstatic java.util.List<TestCaseWithMetadata>collectTestCases(TestGroup tg)Collect all test cases from a test group (flattening hierarchy)static TermencodeAdjacencyList(java.util.List<Pair<java.lang.Integer,java.util.List<java.lang.Integer>>> pairs)Encode an adjacency list as a Termstatic TermencodeCaseConvention(CaseConvention conv)Encode CaseConvention as a Term (unit variant)static TermencodeEitherListList(Either<java.util.List<java.util.List<java.lang.Integer>>,java.util.List<java.lang.Integer>> e)Encode Either [[Int]] [Int] as a Termstatic TermencodeInt(java.lang.Integer n)Encode an Int as a Termstatic TermencodeIntList(java.util.List<java.lang.Integer> ints)Encode [Int] as a Termstatic TermencodeListList(java.util.List<java.util.List<java.lang.Integer>> lists)Encode [[Int]] as a Termstatic ModuletransformModule(Module m)Transform module with generation namespacestatic <T0> Optional<T0>transformTestCase(T0 tcm)Pass through test cases unchangedstatic Optional<TestGroup>transformToCompiledTests(TestGroup tg)Transform test group hierarchy to only include delegated evaluation tests
-
-
-
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
-
transformTestCase
static <T0> Optional<T0> transformTestCase(T0 tcm)
Pass through test cases unchanged
-
-