integration-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Testlib.PTest

Synopsis

Documentation

class HasTests x where Source #

Methods

mkTests :: String -> String -> String -> String -> x -> IO [Test] Source #

Instances

Instances details
HasTests (App ()) Source # 
Instance details

Defined in Testlib.PTest

Methods

mkTests :: String -> String -> String -> String -> App () -> IO [Test] Source #

(HasTests x, TestCases a) => HasTests (a -> x) Source # 
Instance details

Defined in Testlib.PTest

Methods

mkTests :: String -> String -> String -> String -> (a -> x) -> IO [Test] Source #

data TestCase a Source #

Constructors

MkTestCase 

Fields

Instances

Instances details
Foldable TestCase Source # 
Instance details

Defined in Testlib.PTest

Methods

fold :: Monoid m => TestCase m -> m #

foldMap :: Monoid m => (a -> m) -> TestCase a -> m #

foldMap' :: Monoid m => (a -> m) -> TestCase a -> m #

foldr :: (a -> b -> b) -> b -> TestCase a -> b #

foldr' :: (a -> b -> b) -> b -> TestCase a -> b #

foldl :: (b -> a -> b) -> b -> TestCase a -> b #

foldl' :: (b -> a -> b) -> b -> TestCase a -> b #

foldr1 :: (a -> a -> a) -> TestCase a -> a #

foldl1 :: (a -> a -> a) -> TestCase a -> a #

toList :: TestCase a -> [a] #

null :: TestCase a -> Bool #

length :: TestCase a -> Int #

elem :: Eq a => a -> TestCase a -> Bool #

maximum :: Ord a => TestCase a -> a #

minimum :: Ord a => TestCase a -> a #

sum :: Num a => TestCase a -> a #

product :: Num a => TestCase a -> a #

Traversable TestCase Source # 
Instance details

Defined in Testlib.PTest

Methods

traverse :: Applicative f => (a -> f b) -> TestCase a -> f (TestCase b) #

sequenceA :: Applicative f => TestCase (f a) -> f (TestCase a) #

mapM :: Monad m => (a -> m b) -> TestCase a -> m (TestCase b) #

sequence :: Monad m => TestCase (m a) -> m (TestCase a) #

Functor TestCase Source # 
Instance details

Defined in Testlib.PTest

Methods

fmap :: (a -> b) -> TestCase a -> TestCase b #

(<$) :: a -> TestCase b -> TestCase a #

Generic (TestCase a) Source # 
Instance details

Defined in Testlib.PTest

Associated Types

type Rep (TestCase a) :: Type -> Type #

Methods

from :: TestCase a -> Rep (TestCase a) x #

to :: Rep (TestCase a) x -> TestCase a #

Show a => Show (TestCase a) Source # 
Instance details

Defined in Testlib.PTest

Methods

showsPrec :: Int -> TestCase a -> ShowS #

show :: TestCase a -> String #

showList :: [TestCase a] -> ShowS #

Eq a => Eq (TestCase a) Source # 
Instance details

Defined in Testlib.PTest

Methods

(==) :: TestCase a -> TestCase a -> Bool #

(/=) :: TestCase a -> TestCase a -> Bool #

Ord a => Ord (TestCase a) Source # 
Instance details

Defined in Testlib.PTest

Methods

compare :: TestCase a -> TestCase a -> Ordering #

(<) :: TestCase a -> TestCase a -> Bool #

(<=) :: TestCase a -> TestCase a -> Bool #

(>) :: TestCase a -> TestCase a -> Bool #

(>=) :: TestCase a -> TestCase a -> Bool #

max :: TestCase a -> TestCase a -> TestCase a #

min :: TestCase a -> TestCase a -> TestCase a #

type Rep (TestCase a) Source # 
Instance details

Defined in Testlib.PTest

type Rep (TestCase a) = D1 ('MetaData "TestCase" "Testlib.PTest" "integration-0.1.0-3ATitUsC6IZKz3Fn68yYH1" 'False) (C1 ('MetaCons "MkTestCase" 'PrefixI 'True) (S1 ('MetaSel ('Just "testCaseName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "testCase") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

class TestCases a where Source #

enumerate all members of a bounded enum type

Instances

Instances details
TestCases ConversationProtocol Source # 
Instance details

Defined in Test.AccessUpdate

TestCases APIAccess Source # 
Instance details

Defined in Test.FeatureFlags.Util

TestCases Feature Source # 
Instance details

Defined in Test.FeatureFlags.Util

TestCases One2OneScenario Source # 
Instance details

Defined in Test.MLS.One2One

TestCases Swagger Source # 
Instance details

Defined in Test.Swagger

TestCases Version5 Source # 
Instance details

Defined in Test.Version

TestCases Versioned' Source #

This instance is used to generate tests for some of the versions. (Not checking all of them for time efficiency reasons)

Instance details

Defined in Test.Version

TestCases Ciphersuite Source # 
Instance details

Defined in Testlib.PTest

TestCases CredentialType Source # 
Instance details

Defined in Testlib.PTest

TestCases AnyFedDomain Source # 
Instance details

Defined in Testlib.VersionedFed

TestCases StaticDomain Source # 
Instance details

Defined in Testlib.VersionedFed

(Generic a, GEnum (Rep a)) => TestCases a Source #

a default instance, normally we don't do such things but this is more convenient in the test suite as you don't have to derive anything

Instance details

Defined in Testlib.PTest

(TestCases a, TestCases b) => TestCases (OneOf a b) Source # 
Instance details

Defined in Testlib.PTest

Methods

mkTestCases :: IO [TestCase (OneOf a b)] Source #

(GEnum (Rep a), KnownSymbol s, Generic a) => TestCases (Tagged s a) Source #

only works for outer-most use of Tagged (not: `Maybe (Tagged "bla" Bool)`)

Instance details

Defined in Testlib.PTest

Methods

mkTestCases :: IO [TestCase (Tagged s a)] Source #

KnownNat n => TestCases (FedDomain n) Source # 
Instance details

Defined in Testlib.VersionedFed

newtype Tagged s a Source #

Constructors

MkTagged 

Fields

Instances

Instances details
Generic (Tagged s a) Source # 
Instance details

Defined in Testlib.PTest

Associated Types

type Rep (Tagged s a) :: Type -> Type #

Methods

from :: Tagged s a -> Rep (Tagged s a) x #

to :: Rep (Tagged s a) x -> Tagged s a #

Show a => Show (Tagged s a) Source # 
Instance details

Defined in Testlib.PTest

Methods

showsPrec :: Int -> Tagged s a -> ShowS #

show :: Tagged s a -> String #

showList :: [Tagged s a] -> ShowS #

Eq a => Eq (Tagged s a) Source # 
Instance details

Defined in Testlib.PTest

Methods

(==) :: Tagged s a -> Tagged s a -> Bool #

(/=) :: Tagged s a -> Tagged s a -> Bool #

Ord a => Ord (Tagged s a) Source # 
Instance details

Defined in Testlib.PTest

Methods

compare :: Tagged s a -> Tagged s a -> Ordering #

(<) :: Tagged s a -> Tagged s a -> Bool #

(<=) :: Tagged s a -> Tagged s a -> Bool #

(>) :: Tagged s a -> Tagged s a -> Bool #

(>=) :: Tagged s a -> Tagged s a -> Bool #

max :: Tagged s a -> Tagged s a -> Tagged s a #

min :: Tagged s a -> Tagged s a -> Tagged s a #

(GEnum (Rep a), KnownSymbol s, Generic a) => TestCases (Tagged s a) Source #

only works for outer-most use of Tagged (not: `Maybe (Tagged "bla" Bool)`)

Instance details

Defined in Testlib.PTest

Methods

mkTestCases :: IO [TestCase (Tagged s a)] Source #

type Rep (Tagged s a) Source # 
Instance details

Defined in Testlib.PTest

type Rep (Tagged s a) = D1 ('MetaData "Tagged" "Testlib.PTest" "integration-0.1.0-3ATitUsC6IZKz3Fn68yYH1" 'True) (C1 ('MetaCons "MkTagged" 'PrefixI 'True) (S1 ('MetaSel ('Just "unTagged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

pattern TaggedBool :: Bool -> Tagged s Bool Source #

class GEnum f where Source #

Methods

uni :: [([Either String String], f x)] Source #

Instances

Instances details
GEnum (U1 :: k -> Type) Source # 
Instance details

Defined in Testlib.PTest

Methods

uni :: forall (x :: k0). [([Either String String], U1 x)] Source #

(GEnum k1, GEnum k2) => GEnum (k1 :+: k2 :: k -> Type) Source # 
Instance details

Defined in Testlib.PTest

Methods

uni :: forall (x :: k0). [([Either String String], (k1 :+: k2) x)] Source #

(GEnum k2, KnownSymbol n) => GEnum (C1 ('MetaCons n p b) k2 :: k1 -> Type) Source # 
Instance details

Defined in Testlib.PTest

Methods

uni :: forall (x :: k). [([Either String String], C1 ('MetaCons n p b) k2 x)] Source #

(GEnum k2, KnownSymbol n) => GEnum (D1 ('MetaData n m p b) k2 :: k1 -> Type) Source # 
Instance details

Defined in Testlib.PTest

Methods

uni :: forall (x :: k). [([Either String String], D1 ('MetaData n m p b) k2 x)] Source #

(GEnum (Rep k2), Generic k2) => GEnum (K1 r k2 :: k1 -> Type) Source # 
Instance details

Defined in Testlib.PTest

Methods

uni :: forall (x :: k). [([Either String String], K1 r k2 x)] Source #

GEnum k2 => GEnum (S1 md k2 :: k1 -> Type) Source # 
Instance details

Defined in Testlib.PTest

Methods

uni :: forall (x :: k). [([Either String String], S1 md k2 x)] Source #

data OneOf a b Source #

Constructors

OneOfA a 
OneOfB b 

Instances

Instances details
(MakesValue a, MakesValue b) => MakesValue (OneOf a b) Source # 
Instance details

Defined in Testlib.PTest

Methods

make :: OneOf a b -> App Value Source #

(TestCases a, TestCases b) => TestCases (OneOf a b) Source # 
Instance details

Defined in Testlib.PTest

Methods

mkTestCases :: IO [TestCase (OneOf a b)] Source #