@@ -11,7 +11,7 @@ import qualified Source.Source as Source
1111import Source.Span
1212import qualified Test.Tasty as Tasty
1313import Test.Tasty.HUnit
14- import Test.Tasty.Hedgehog (testProperty )
14+ import Test.Tasty.Hedgehog (testPropertyNamed )
1515
1616
1717source :: MonadGen m => Range. Range Int -> m Source. Source
@@ -22,23 +22,23 @@ source r = Gen.frequency [ (1, empty), (20, nonEmpty) ] where
2222testTree :: Tasty. TestTree
2323testTree = Tasty. testGroup " Source.Source"
2424 [ Tasty. testGroup " lineRanges"
25- [ testProperty " produces 1 more range than there are newlines" . property $ do
25+ [ testPropertyNamed " produces 1 more range than there are newlines" " Source_lineRanges_produces_1_more_range_than_there_are_newlines " . property $ do
2626 source <- forAll (source (Range. linear 0 100 ))
2727 summarize source
2828 length (Source. lineRanges source) === length (Text. splitOn " \r\n " (Source. toText source) >>= Text. splitOn " \r " >>= Text. splitOn " \n " )
2929
30- , testProperty " produces exhaustive ranges" . property $ do
30+ , testPropertyNamed " produces exhaustive ranges" " Source_lineRanges_produces_exhaustive_ranges " . property $ do
3131 source <- forAll (source (Range. linear 0 100 ))
3232 summarize source
3333 foldMap (Source. slice source) (Source. lineRanges source) === source
3434 ]
3535
3636 , Tasty. testGroup " totalSpan"
37- [ testProperty " covers single lines" . property $ do
37+ [ testPropertyNamed " covers single lines" " Source_totalSpan_covers_single_lines " . property $ do
3838 n <- forAll $ Gen. int (Range. linear 0 100 )
3939 Source. totalSpan (Source. fromText (Text. replicate n " *" )) === Span (Pos 1 1 ) (Pos 1 (max 1 (succ n)))
4040
41- , testProperty " covers multiple lines" . property $ do
41+ , testPropertyNamed " covers multiple lines" " Source_totalSpan_covers_multiple_lines " . property $ do
4242 n <- forAll $ Gen. int (Range. linear 0 100 )
4343 Source. totalSpan (Source. fromText (Text. intersperse ' \n ' (Text. replicate n " *" ))) === Span (Pos 1 1 ) (Pos (max 1 n) (if n > 0 then 2 else 1 ))
4444 ]
0 commit comments