ouroboros-consensus-test- Tests of the consensus layer
Safe HaskellNone




type Labelled a = [(Maybe String, a)] Source #

class ToGoldenDirectory a where Source #

Convert a to a FilePath that can be used as the directory containing golden output files.

This class allows overriding the Show in cases where that output is not suitable to be used as a directory.

For example, the Show output for a hard fork enabled NodeToNodeVersion will contain colons, asterisks, spaces, parentheses, ... and other characters that we don't want to use for a directory name. For instance colons cannot be used in Windows file/folder names.

Minimal complete definition



toGoldenDirectory ∷ a → FilePath Source #

default toGoldenDirectoryShow a ⇒ a → FilePath Source #

combineExamples ∷ ∀ blk. (∀ a. Labelled a → Labelled a → Labelled a) → Examples blk → Examples blk → Examples blk Source #

goldenTest_all Source #


∷ (SerialiseDiskConstraints blk, SerialiseNodeToNodeConstraints blk, SerialiseNodeToClientConstraints blk, SupportedNetworkProtocolVersion blk, ToGoldenDirectory (BlockNodeToNodeVersion blk), ToGoldenDirectory (QueryVersion, BlockNodeToClientVersion blk), HasCallStack) 
CodecConfig blk 

Path relative to the root of the repository that contains the golden files

Examples blk 
→ TestTree 

Golden tests for all things we serialise to disk and send across the network.

Exceptions: when an encoder throws an exception, which can happen when serialising a Shelley header in combination with CardanoNodeToNodeVersion1, we show the exception and use that as the output.

labelled ∷ [(String, a)] → Labelled a Source #

mapExamples ∷ ∀ blk. (∀ a. Labelled a → Labelled a) → Examples blk → Examples blk Source #

prefixExamplesStringExamples blk → Examples blk Source #

Add the given prefix to each labelled example.

When a label is empty, the prefix is used as the label. If the label is not empty, the prefix and _ are prepended.

Orphan instances

Condense TermToken Source # 
Instance details


condense ∷ TermToken → String Source #