| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Test.Sandwich.Misc
Description
Miscellaneous exports that need to be exposed, but aren't super interesting. Gathered here to avoid cluttering other files.
Synopsis
- data ExampleT context m a
- type ExampleM context = ExampleT context IO
- type Spec context m = SpecFree context m ()
- type SpecFree context m a = Free (SpecCommand context m) a
- type CoreSpec = Spec BaseContext IO
- type TopSpec = forall context. HasBaseContext context => SpecFree context IO ()
- type TopSpecWithOptions = forall context. (HasBaseContext context, HasCommandLineOptions context ()) => SpecFree context IO ()
- type TopSpecWithOptions' a = forall context. (HasBaseContext context, HasCommandLineOptions context a) => SpecFree context IO ()
- isEmptySpec :: forall context. Free (SpecCommand context IO) () -> Bool
- data CommandLineOptions a = CommandLineOptions {
- optFormatter :: FormatterType
- optLogLevel :: Maybe LogLevel
- optVisibilityThreshold :: Maybe Int
- optTreeFilter :: [String]
- optRepeatCount :: Int
- optFixedRoot :: Maybe String
- optDryRun :: Maybe Bool
- optMarkdownSummaryPath :: Maybe FilePath
- optListAvailableTests :: Maybe Bool
- optPrintGoldenFlags :: Maybe Bool
- optPrintQuickCheckFlags :: Maybe Bool
- optPrintHedgehogFlags :: Maybe Bool
- optPrintSlackFlags :: Maybe Bool
- optPrintWebDriverFlags :: Maybe Bool
- optIndividualTestModule :: Maybe IndividualTestModule
- optGoldenOptions :: CommandLineGoldenOptions
- optQuickCheckOptions :: CommandLineQuickCheckOptions
- optHedgehogOptions :: CommandLineHedgehogOptions
- optSlackOptions :: CommandLineSlackOptions
- optWebdriverOptions :: CommandLineWebdriverOptions
- optUserOptions :: a
- data CommandLineQuickCheckOptions = CommandLineQuickCheckOptions {}
- data CommandLineHedgehogOptions = CommandLineHedgehogOptions {}
- data CommandLineSlackOptions = CommandLineSlackOptions {}
- data CommandLineWebdriverOptions = CommandLineWebdriverOptions {}
- data BrowserToUse
- data DisplayType
- commandLineOptionsWithInfo :: Parser a -> Parser (Maybe IndividualTestModule) -> ParserInfo (CommandLineOptions a)
- data Label (l :: Symbol) a = Label
- data LabelValue (l :: Symbol) a = LabelValue a
- class HasLabel context (l :: Symbol) a
- data (a :: *) :> (b :: *)
- data BaseContext
- class HasBaseContext a
- type HasCommandLineOptions context a = HasLabel context "commandLineOptions" (CommandLineOptions a)
- data Result
- data FailureReason
- = Reason { }
- | ExpectedButGot {
- failureCallStack :: Maybe CallStack
- failureValue1 :: ShowEqBox
- failureValue2 :: ShowEqBox
- | DidNotExpectButGot {
- failureCallStack :: Maybe CallStack
- failureValue1 :: ShowEqBox
- | GotException { }
- | Pending { }
- | GetContextException { }
- | GotAsyncException { }
- | ChildrenFailed { }
- | RawImage { }
- data SomeExceptionWithCallStack = forall e.Exception e => SomeExceptionWithCallStack e CallStack
- newtype SomeExceptionWithEq = SomeExceptionWithEq SomeException
- data ExitReason
The example monad
data ExampleT context m a Source #
Instances
Spec types
type SpecFree context m a = Free (SpecCommand context m) a Source #
type TopSpecWithOptions = forall context. (HasBaseContext context, HasCommandLineOptions context ()) => SpecFree context IO () Source #
type TopSpecWithOptions' a = forall context. (HasBaseContext context, HasCommandLineOptions context a) => SpecFree context IO () Source #
isEmptySpec :: forall context. Free (SpecCommand context IO) () -> Bool Source #
Command line options
data CommandLineOptions a Source #
Constructors
| CommandLineOptions | |
Fields
| |
Instances
| Show a => Show (CommandLineOptions a) Source # | |
Defined in Test.Sandwich.Types.ArgParsing | |
data CommandLineQuickCheckOptions Source #
Constructors
| CommandLineQuickCheckOptions | |
Instances
data CommandLineHedgehogOptions Source #
Constructors
| CommandLineHedgehogOptions | |
Instances
data CommandLineSlackOptions Source #
Constructors
| CommandLineSlackOptions | |
Instances
data CommandLineWebdriverOptions Source #
Constructors
Instances
data BrowserToUse Source #
Constructors
| UseChrome | |
| UseFirefox |
Instances
| Show BrowserToUse Source # | |
Defined in Test.Sandwich.Types.ArgParsing | |
data DisplayType Source #
Instances
| Read DisplayType Source # | |
Defined in Test.Sandwich.Types.ArgParsing | |
| Show DisplayType Source # | |
Defined in Test.Sandwich.Types.ArgParsing | |
commandLineOptionsWithInfo :: Parser a -> Parser (Maybe IndividualTestModule) -> ParserInfo (CommandLineOptions a) Source #
Labels
data LabelValue (l :: Symbol) a Source #
Constructors
| LabelValue a |
Instances
| HasLabel (LabelValue l a :> context) l a Source # | |
Defined in Test.Sandwich.Types.Spec Methods getLabelValue :: Label l a -> (LabelValue l a :> context) -> a | |
| HasLabel (LabelValue l a) l a Source # | |
Defined in Test.Sandwich.Types.Spec Methods getLabelValue :: Label l a -> LabelValue l a -> a | |
class HasLabel context (l :: Symbol) a Source #
Minimal complete definition
getLabelValue
Instances
| HasLabel (LabelValue l a :> context) l a Source # | |
Defined in Test.Sandwich.Types.Spec Methods getLabelValue :: Label l a -> (LabelValue l a :> context) -> a | |
| HasLabel context l a => HasLabel (intro :> context) l a Source # | |
Defined in Test.Sandwich.Types.Spec Methods getLabelValue :: Label l a -> (intro :> context) -> a | |
| HasLabel (LabelValue l a) l a Source # | |
Defined in Test.Sandwich.Types.Spec Methods getLabelValue :: Label l a -> LabelValue l a -> a | |
data (a :: *) :> (b :: *) infixr 9 Source #
Instances
| (Show a, Show b) => Show (a :> b) Source # | |
| HasBaseContext context => HasBaseContext (intro :> context) Source # | |
Defined in Test.Sandwich.Types.RunTree Methods getBaseContext :: (intro :> context) -> BaseContext modifyBaseContext :: (intro :> context) -> (BaseContext -> BaseContext) -> intro :> context | |
| HasLabel (LabelValue l a :> context) l a Source # | |
Defined in Test.Sandwich.Types.Spec Methods getLabelValue :: Label l a -> (LabelValue l a :> context) -> a | |
| HasLabel context l a => HasLabel (intro :> context) l a Source # | |
Defined in Test.Sandwich.Types.Spec Methods getLabelValue :: Label l a -> (intro :> context) -> a | |
Context classes
data BaseContext Source #
The base context available to every test node. Contains various paths and timing information.
Instances
| HasBaseContext BaseContext Source # | |
Defined in Test.Sandwich.Types.RunTree Methods getBaseContext :: BaseContext -> BaseContext modifyBaseContext :: BaseContext -> (BaseContext -> BaseContext) -> BaseContext | |
class HasBaseContext a Source #
Has-* class for asserting a BaseContext is available.
Minimal complete definition
getBaseContext, modifyBaseContext
Instances
| HasBaseContext BaseContext Source # | |
Defined in Test.Sandwich.Types.RunTree Methods getBaseContext :: BaseContext -> BaseContext modifyBaseContext :: BaseContext -> (BaseContext -> BaseContext) -> BaseContext | |
| HasBaseContext context => HasBaseContext (intro :> context) Source # | |
Defined in Test.Sandwich.Types.RunTree Methods getBaseContext :: (intro :> context) -> BaseContext modifyBaseContext :: (intro :> context) -> (BaseContext -> BaseContext) -> intro :> context | |
type HasCommandLineOptions context a = HasLabel context "commandLineOptions" (CommandLineOptions a) Source #
Has-* class for asserting a 'CommandLineOptions a' is available.
Result types
Constructors
| Success | |
| Failure FailureReason | |
| DryRun | |
| Cancelled |
data FailureReason Source #
Constructors
| Reason | |
Fields | |
| ExpectedButGot | |
Fields
| |
| DidNotExpectButGot | |
Fields
| |
| GotException | |
| Pending | |
Fields | |
| GetContextException | |
| GotAsyncException | |
| ChildrenFailed | |
Fields | |
| RawImage | |
Fields | |
Instances
| Exception FailureReason Source # | |
Defined in Test.Sandwich.Types.Spec Methods toException :: FailureReason -> SomeException Source # fromException :: SomeException -> Maybe FailureReason Source # | |
| Show FailureReason Source # | |
Defined in Test.Sandwich.Types.Spec | |
| Eq FailureReason Source # | |
Defined in Test.Sandwich.Types.Spec Methods (==) :: FailureReason -> FailureReason -> Bool Source # (/=) :: FailureReason -> FailureReason -> Bool Source # | |
data SomeExceptionWithCallStack Source #
A wrapper type for exceptions with attached callstacks. Haskell doesn't currently offer a way to reliably get a callstack from an exception, but if you can throw (or catch+rethrow) this type then we'll unwrap it and present the callstack nicely.
Constructors
| forall e.Exception e => SomeExceptionWithCallStack e CallStack |
Instances
newtype SomeExceptionWithEq Source #
Constructors
| SomeExceptionWithEq SomeException |
Instances
| Show SomeExceptionWithEq Source # | |
Defined in Test.Sandwich.Types.Spec | |
| Eq SomeExceptionWithEq Source # | |
Defined in Test.Sandwich.Types.Spec Methods (==) :: SomeExceptionWithEq -> SomeExceptionWithEq -> Bool Source # (/=) :: SomeExceptionWithEq -> SomeExceptionWithEq -> Bool Source # | |
data ExitReason Source #
Constructors
| NormalExit | |
| SignalExit |
Instances
| Show ExitReason Source # | |
Defined in Test.Sandwich.Types.General | |
| Eq ExitReason Source # | |
Defined in Test.Sandwich.Types.General Methods (==) :: ExitReason -> ExitReason -> Bool Source # (/=) :: ExitReason -> ExitReason -> Bool Source # | |