Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit b5e6aab

Browse files
committed
Label cases as empty/non-empty.
1 parent 258e254 commit b5e6aab

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/Data/Source/Spec.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ testTree :: Tasty.TestTree
2828
testTree = Tasty.testGroup "Data.Source"
2929
[ Tasty.testGroup "sourceLineRanges"
3030
[ QC.testProperty "produces 1 more range than there are newlines" $
31-
\ source -> length (sourceLineRanges source) QC.=== succ (Text.count "\n" (toText source))
31+
\ source -> QC.label (summarize source) $ length (sourceLineRanges source) QC.=== succ (Text.count "\n" (toText source))
3232

3333
, prop "produces exhaustive ranges" $
3434
\ source -> foldMap (`slice` source) (sourceLineRanges source) === source
@@ -70,6 +70,9 @@ testTree = Tasty.testGroup "Data.Source"
7070
]
7171

7272
]
73+
where summarize src
74+
| nullSource src = "empty"
75+
| otherwise = "non-empty"
7376

7477
spec :: Spec
7578
spec = do

0 commit comments

Comments
 (0)