mirror of
https://github.com/github/semantic.git
synced 2025-01-03 04:51:57 +03:00
Import from Diffing
This commit is contained in:
parent
f79d04e437
commit
c608d62a3a
@ -21,6 +21,7 @@ import Test.Hspec (Spec, describe, it, parallel)
|
||||
import Test.Hspec.Expectations.Pretty
|
||||
import Test.Hspec.QuickCheck
|
||||
import Data.These
|
||||
import Diffing (getLabel)
|
||||
|
||||
sourceSpanBetween :: (Int, Int) -> (Int, Int) -> SourceSpan
|
||||
sourceSpanBetween (s1, e1) (s2, e2) = SourceSpan (SourcePos s1 e1) (SourcePos s2 e2)
|
||||
@ -43,10 +44,6 @@ replacementSummary = DiffSummary { patch = Replace (LeafInfo "string" "a" $ sour
|
||||
blobs :: Both SourceBlob
|
||||
blobs = both (SourceBlob (fromText "[]") nullOid "a.js" (Just defaultPlainBlob)) (SourceBlob (fromText "[a]") nullOid "b.js" (Just defaultPlainBlob))
|
||||
|
||||
getLabel (h :< t) = (category h, case t of
|
||||
Leaf s -> Just s
|
||||
_ -> Nothing)
|
||||
|
||||
spec :: Spec
|
||||
spec = parallel $ do
|
||||
describe "diffSummaries" $ do
|
||||
|
Loading…
Reference in New Issue
Block a user