1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 02:58:36 +03:00

Test that Both coalesces when both sides coalesce.

This commit is contained in:
Rob Rix 2016-03-15 10:50:13 -04:00
parent 0129bffe6e
commit b3bb9e2c3e
2 changed files with 14 additions and 1 deletions

View File

@ -1 +1,12 @@
module Data.Functor.Both.Spec where module Data.Functor.Both.Spec (spec) where
import Data.Coalescent
import Data.Functor.Both
import Line
import Test.Hspec
spec :: Spec
spec = do
describe "Coalescent" $ do
it "should coalesce when both sides coalesce" $
(both (Line [True]) (Line [True]) `coalesce` both (Line [True]) (Line [True]) :: [Both (Line Bool)]) `shouldBe` [both (Line [True, True]) (Line [True, True])]

View File

@ -3,6 +3,7 @@ module Main where
import qualified AlignmentSpec import qualified AlignmentSpec
import qualified CorpusSpec import qualified CorpusSpec
import qualified Data.Adjoined.Spec import qualified Data.Adjoined.Spec
import qualified Data.Functor.Both.Spec
import qualified InterpreterSpec import qualified InterpreterSpec
import qualified OrderedMapSpec import qualified OrderedMapSpec
import qualified PatchOutputSpec import qualified PatchOutputSpec
@ -14,6 +15,7 @@ main = hspec $ parallel $ do
describe "Alignment" AlignmentSpec.spec describe "Alignment" AlignmentSpec.spec
describe "Corpus" CorpusSpec.spec describe "Corpus" CorpusSpec.spec
describe "Data.Adjoined" Data.Adjoined.Spec.spec describe "Data.Adjoined" Data.Adjoined.Spec.spec
describe "Data.Functor.Both" Data.Functor.Both.Spec.spec
describe "Interpreter" InterpreterSpec.spec describe "Interpreter" InterpreterSpec.spec
describe "OrderedMap" OrderedMapSpec.spec describe "OrderedMap" OrderedMapSpec.spec
describe "PatchOutput" PatchOutputSpec.spec describe "PatchOutput" PatchOutputSpec.spec