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

Commit 3beda88

Browse files
robrixpatrickt
andcommitted
Move the label call into summarize.
Co-Authored-By: Patrick Thomson <patrickt@users.noreply.github.com>
1 parent 698497b commit 3beda88

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/Data/Source/Spec.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ testTree :: Tasty.TestTree
2626
testTree = Tasty.testGroup "Data.Source"
2727
[ Tasty.testGroup "sourceLineRanges"
2828
[ prop "produces 1 more range than there are newlines" $ \ source -> do
29-
label (summarize source)
29+
summarize source
3030
length (sourceLineRanges source) === length (Text.splitOn "\r\n" (toText source) >>= Text.splitOn "\r" >>= Text.splitOn "\n")
3131

3232
, prop "produces exhaustive ranges" $ \ source -> do
33-
label (summarize source)
33+
summarize source
3434
foldMap (`slice` source) (sourceLineRanges source) === source
3535
]
3636

@@ -70,7 +70,7 @@ testTree = Tasty.testGroup "Data.Source"
7070
]
7171

7272
]
73-
where summarize src = case sourceLines src of
73+
where summarize src = label $ case sourceLines src of
7474
[] -> "empty"
7575
[x] -> if nullSource x then "empty" else "single-line"
7676
_ -> "multiple lines"

0 commit comments

Comments
 (0)