File: DoesNotUse.hs

package info (click to toggle)
haskell-inspection-testing 0.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 208 kB
  • sloc: haskell: 2,053; makefile: 3
file content (19 lines) | stat: -rw-r--r-- 462 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# LANGUAGE TemplateHaskell #-}
module DoesNotUse where

import Test.Inspection
import Control.Exception.Base (patError)

matches (Just _) = True
matches Nothing = False

partial (Just _) = Left


inspect $ ('matches `doesNotUse` 'Just) { expectFail = True }
inspect $ 'matches `doesNotUse` 'patError
inspect $ ('partial `doesNotUse` 'patError) { expectFail = True }
inspect $ ('partial `doesNotUse` 'Left) { expectFail = True }

main :: IO ()
main = return ()