1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 07:25:44 +03:00

Fix up some tests.

This commit is contained in:
Rob Rix 2019-10-18 11:28:03 -04:00
parent 9c67f48905
commit 2a788703ba
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -10,14 +10,13 @@ import Data.Maybe
import Data.Mergeable
import Data.Sum
import Data.Term
import Data.These
import Diffing.Interpreter
import qualified Data.Syntax as Syntax
import Test.Hspec (Spec, describe, it)
import Test.Hspec.Expectations
import Test.Hspec.LeanCheck
import Test.LeanCheck.Core
import SpecHelpers (edit)
import SpecHelpers (Edit(..), edit)
spec :: Spec
spec = do
@ -60,11 +59,11 @@ spec = do
describe "diffTermPair" $ do
prop "produces an Insert when the first term is missing" $ do
\ after -> let diff = diffTermPair (That after) :: Diff ListableSyntax () () in
\ after -> let diff = diffTermPair (Insert after) :: Diff ListableSyntax () () in
diff `shouldBe` inserting after
prop "produces a Delete when the second term is missing" $ do
\ before -> let diff = diffTermPair (This before) :: Diff ListableSyntax () () in
\ before -> let diff = diffTermPair (Delete before) :: Diff ListableSyntax () () in
diff `shouldBe` deleting before