Skip to content

Commit f34d064

Browse files
committed
More informative assert
1 parent 2a8656b commit f34d064

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ghcide/test/exe/TestUtils.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ checkDefs (defToLocation -> defs) mkExpectations = traverse_ check =<< mkExpecta
290290

291291
assertOneDefinitionFound :: [Location] -> Session Location
292292
assertOneDefinitionFound [def] = pure def
293-
assertOneDefinitionFound _ = liftIO $ assertFailure "Expecting exactly one definition"
293+
assertOneDefinitionFound xs = liftIO . assertFailure $ "Expecting exactly one definition, got " <> show (length xs)
294294

295295
assertRangeCorrect Location{_range = foundRange} expectedRange =
296296
liftIO $ expectedRange @=? foundRange

0 commit comments

Comments
 (0)