1
1
mirror of https://github.com/github/semantic.git synced 2024-12-28 17:32:05 +03:00

Allow all of the tests to run in parallel.

This commit is contained in:
Rob Rix 2016-01-05 10:38:51 -05:00
parent 51e7d382c9
commit 0590af9bc9
6 changed files with 7 additions and 6 deletions

View File

@ -11,7 +11,7 @@ import Categorizable
import Test.Hspec
spec :: Spec
spec = do
spec = parallel $ do
describe "interpret" $ do
it "returns a replacement when comparing two unicode equivalent terms" $
I.interpret comparable (Info range mempty :< Leaf "t\776") (Info range2 mempty :< Leaf "\7831") `shouldBe`

View File

@ -4,7 +4,7 @@ import OrderedMap as Map
import Test.Hspec
spec :: Spec
spec = do
spec = parallel $ do
describe "difference" $ do
it "should return those elements of a not in b" $
Map.difference a b `shouldBe` (Map.fromList [ ("a", 1) ])

View File

@ -9,7 +9,7 @@ import Control.Monad.Free
import Test.Hspec
spec :: Spec
spec = do
spec = parallel $ do
describe "hunks" $ do
it "empty diffs have no hunks" $
hunks (Free . Annotated (Info (Range 0 0) mempty, Info (Range 0 0) mempty) $ Leaf "") (fromList "", fromList "") `shouldBe` []

View File

@ -4,7 +4,8 @@ import Test.Hspec
import Range
spec :: Spec
spec = describe "rangesAndWordsFrom" $ do
spec = parallel $ do
describe "rangesAndWordsFrom" $ do
it "should produce no ranges for the empty string" $
rangesAndWordsFrom 0 mempty `shouldBe` []

View File

@ -35,7 +35,7 @@ arbitraryLeaf = toTuple <$> arbitrary
where toTuple string = (string, Info (Range 0 $ length string) mempty, Leaf string)
spec :: Spec
spec = do
spec = parallel $ do
describe "splitAnnotatedByLines" $ do
prop "outputs one row for single-line unchanged leaves" $
forAll (arbitraryLeaf `suchThat` isOnSingleLine) $

View File

@ -16,7 +16,7 @@ main :: IO ()
main = hspec spec
spec :: Spec
spec = do
spec = parallel $ do
describe "Term" $ do
prop "equality is reflexive" $
\ a -> unTerm a == unTerm (a :: ArbitraryTerm String ())