hydra-0.13.0: src/gen-test/haskell/Hydra/Test/Lib/Pairs.hs
-- Note: this is an automatically generated file. Do not edit.
-- | Test cases for hydra.lib.pairs primitives
module Hydra.Test.Lib.Pairs where
import qualified Hydra.Core as Core
import qualified Hydra.Testing as Testing
import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
import qualified Data.ByteString as B
import qualified Data.Int as I
import qualified Data.List as L
import qualified Data.Map as M
import qualified Data.Set as S
-- | Test cases for hydra.lib.pairs primitives
allTests :: Testing.TestGroup
allTests = Testing.TestGroup {
Testing.testGroupName = "hydra.lib.pairs primitives",
Testing.testGroupDescription = Nothing,
Testing.testGroupSubgroups = [
Testing.TestGroup {
Testing.testGroupName = "bimap",
Testing.testGroupDescription = Nothing,
Testing.testGroupSubgroups = [],
Testing.testGroupCases = [
Testing.TestCaseWithMetadata {
Testing.testCaseWithMetadataName = "transform both elements",
Testing.testCaseWithMetadataCase = (Testing.TestCaseEvaluation (Testing.EvaluationTestCase {
Testing.evaluationTestCaseEvaluationStyle = Testing.EvaluationStyleEager,
Testing.evaluationTestCaseInput = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.pairs.bimap"))),
Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {
Core.lambdaParameter = (Core.Name "x"),
Core.lambdaDomain = Nothing,
Core.lambdaBody = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.math.mul"))),
Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))})))})),
Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {
Core.lambdaParameter = (Core.Name "s"),
Core.lambdaDomain = Nothing,
Core.lambdaBody = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.strings.length"))),
Core.applicationArgument = (Core.TermVariable (Core.Name "s"))}))})))})),
Core.applicationArgument = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)), (Core.TermLiteral (Core.LiteralString "ab"))))})),
Testing.evaluationTestCaseOutput = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 10)), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))))})),
Testing.testCaseWithMetadataDescription = Nothing,
Testing.testCaseWithMetadataTags = []},
Testing.TestCaseWithMetadata {
Testing.testCaseWithMetadataName = "with zero",
Testing.testCaseWithMetadataCase = (Testing.TestCaseEvaluation (Testing.EvaluationTestCase {
Testing.evaluationTestCaseEvaluationStyle = Testing.EvaluationStyleEager,
Testing.evaluationTestCaseInput = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.pairs.bimap"))),
Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {
Core.lambdaParameter = (Core.Name "x"),
Core.lambdaDomain = Nothing,
Core.lambdaBody = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.math.mul"))),
Core.applicationArgument = (Core.TermVariable (Core.Name "x"))})),
Core.applicationArgument = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 2)))}))})))})),
Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {
Core.lambdaParameter = (Core.Name "s"),
Core.lambdaDomain = Nothing,
Core.lambdaBody = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.strings.length"))),
Core.applicationArgument = (Core.TermVariable (Core.Name "s"))}))})))})),
Core.applicationArgument = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)), (Core.TermLiteral (Core.LiteralString "hello"))))})),
Testing.evaluationTestCaseOutput = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)), (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 5)))))})),
Testing.testCaseWithMetadataDescription = Nothing,
Testing.testCaseWithMetadataTags = []}]},
Testing.TestGroup {
Testing.testGroupName = "first",
Testing.testGroupDescription = Nothing,
Testing.testGroupSubgroups = [],
Testing.testGroupCases = [
Testing.TestCaseWithMetadata {
Testing.testCaseWithMetadataName = "extract first element",
Testing.testCaseWithMetadataCase = (Testing.TestCaseEvaluation (Testing.EvaluationTestCase {
Testing.evaluationTestCaseEvaluationStyle = Testing.EvaluationStyleEager,
Testing.evaluationTestCaseInput = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.pairs.first"))),
Core.applicationArgument = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)), (Core.TermLiteral (Core.LiteralString "hello"))))})),
Testing.evaluationTestCaseOutput = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)))})),
Testing.testCaseWithMetadataDescription = Nothing,
Testing.testCaseWithMetadataTags = []},
Testing.TestCaseWithMetadata {
Testing.testCaseWithMetadataName = "with zero",
Testing.testCaseWithMetadataCase = (Testing.TestCaseEvaluation (Testing.EvaluationTestCase {
Testing.evaluationTestCaseEvaluationStyle = Testing.EvaluationStyleEager,
Testing.evaluationTestCaseInput = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.pairs.first"))),
Core.applicationArgument = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)), (Core.TermLiteral (Core.LiteralString "world"))))})),
Testing.evaluationTestCaseOutput = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))})),
Testing.testCaseWithMetadataDescription = Nothing,
Testing.testCaseWithMetadataTags = []},
Testing.TestCaseWithMetadata {
Testing.testCaseWithMetadataName = "negative number",
Testing.testCaseWithMetadataCase = (Testing.TestCaseEvaluation (Testing.EvaluationTestCase {
Testing.evaluationTestCaseEvaluationStyle = Testing.EvaluationStyleEager,
Testing.evaluationTestCaseInput = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.pairs.first"))),
Core.applicationArgument = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))), (Core.TermLiteral (Core.LiteralString "test"))))})),
Testing.evaluationTestCaseOutput = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 (-5))))})),
Testing.testCaseWithMetadataDescription = Nothing,
Testing.testCaseWithMetadataTags = []}]},
Testing.TestGroup {
Testing.testGroupName = "second",
Testing.testGroupDescription = Nothing,
Testing.testGroupSubgroups = [],
Testing.testGroupCases = [
Testing.TestCaseWithMetadata {
Testing.testCaseWithMetadataName = "extract second element",
Testing.testCaseWithMetadataCase = (Testing.TestCaseEvaluation (Testing.EvaluationTestCase {
Testing.evaluationTestCaseEvaluationStyle = Testing.EvaluationStyleEager,
Testing.evaluationTestCaseInput = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.pairs.second"))),
Core.applicationArgument = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 42)), (Core.TermLiteral (Core.LiteralString "hello"))))})),
Testing.evaluationTestCaseOutput = (Core.TermLiteral (Core.LiteralString "hello"))})),
Testing.testCaseWithMetadataDescription = Nothing,
Testing.testCaseWithMetadataTags = []},
Testing.TestCaseWithMetadata {
Testing.testCaseWithMetadataName = "empty string",
Testing.testCaseWithMetadataCase = (Testing.TestCaseEvaluation (Testing.EvaluationTestCase {
Testing.evaluationTestCaseEvaluationStyle = Testing.EvaluationStyleEager,
Testing.evaluationTestCaseInput = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.pairs.second"))),
Core.applicationArgument = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)), (Core.TermLiteral (Core.LiteralString ""))))})),
Testing.evaluationTestCaseOutput = (Core.TermLiteral (Core.LiteralString ""))})),
Testing.testCaseWithMetadataDescription = Nothing,
Testing.testCaseWithMetadataTags = []},
Testing.TestCaseWithMetadata {
Testing.testCaseWithMetadataName = "long string",
Testing.testCaseWithMetadataCase = (Testing.TestCaseEvaluation (Testing.EvaluationTestCase {
Testing.evaluationTestCaseEvaluationStyle = Testing.EvaluationStyleEager,
Testing.evaluationTestCaseInput = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.pairs.second"))),
Core.applicationArgument = (Core.TermPair (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 123)), (Core.TermLiteral (Core.LiteralString "testing"))))})),
Testing.evaluationTestCaseOutput = (Core.TermLiteral (Core.LiteralString "testing"))})),
Testing.testCaseWithMetadataDescription = Nothing,
Testing.testCaseWithMetadataTags = []}]}],
Testing.testGroupCases = []}