freec-unit-tests

Safe HaskellNone
LanguageHaskell2010

FreeC.Test.Expectations

Contents

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

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.