Safe Haskell | None |
---|---|
Language | Haskell2010 |
FreeC.Test.Expectations
Description
This module contains commonly used expectation setters for the comparison of IR AST nodes.
TODO should we maybe re-export FreeC.Monad.Class.Testable?
Synopsis
- shouldBeSimilarTo :: (Similar a, Pretty a) => a -> a -> Expectation
- shouldNotBeSimilarTo :: (Similar a, Pretty a) => a -> a -> Expectation
- prettyShouldBe :: (Pretty a, Pretty b) => a -> b -> Expectation
Similarity Test
shouldBeSimilarTo :: (Similar a, Pretty a) => a -> a -> Expectation Source #
Sets the expectation that the given AST nodes are similar
.
shouldNotBeSimilarTo :: (Similar a, Pretty a) => a -> a -> Expectation Source #
Sets the expectation that the given AST nodes are notSimilar
.
Pretty Printing Comparison
prettyShouldBe :: (Pretty a, Pretty b) => a -> b -> Expectation Source #
Pretty prints both values and tests whether the resulting strings are equal modulo whitespace.