Skip to content

Commit cbfe71a

Browse files
committed
More informative assert
1 parent 548ab88 commit cbfe71a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: ghcide/test/exe/TestUtils.hs

+1-1
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)