Skip to content

Commit ed449c4

Browse files
committed
fix: replace partial head with pattern match in HistorySpec
1 parent 15d7d08 commit ed449c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/benchmarks/test/unit/Cardano/Wallet/Benchmarks/HistorySpec.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ spec = do
5151
it "parses benchmark CSV into indexed results"
5252
$ case parseResults sampleCsv of
5353
Left e -> fail e
54-
Right rs -> do
54+
Right rs@((ix0, r0) : _) -> do
5555
length rs `shouldBe` 2
56-
let (ix0, r0) = head rs
5756
index ix0 `shouldBe` 0
5857
resultValue r0 `shouldBe` 3.5
58+
Right [] -> fail "expected non-empty results"
5959

6060
it "rejects malformed CSV" $ do
6161
let bad = "not,a,valid,csv\nfoo"

0 commit comments

Comments
 (0)