test: Testing caught me doing stupid stuff
This commit is contained in:
parent
cff27337e7
commit
c78d261a1b
7 changed files with 87 additions and 6 deletions
17
test/Test/Language/Json/Type.hs
Normal file
17
test/Test/Language/Json/Type.hs
Normal file
|
@ -0,0 +1,17 @@
|
|||
{-# LANGUAGE TemplateHaskell #-}
|
||||
module Test.Language.Json.Type (testGroup) where
|
||||
import qualified Language.Json.Type as Type
|
||||
import qualified Language.Json as Json
|
||||
import Test.QuickCheck (allProperties, Property)
|
||||
import qualified Test.Tasty.QuickCheck as Tasty.QuickCheck
|
||||
import Test.Tasty (TestTree)
|
||||
|
||||
prop_inferredTypeConformsSourceValue :: Json.PrintableValue -> Bool
|
||||
prop_inferredTypeConformsSourceValue (Json.PrintableValue value) = null (Type.conforms (Type.infer value) value)
|
||||
|
||||
return [] -- make ghc 'commit' already defined values
|
||||
properties :: [(String, Property)]
|
||||
properties = $allProperties
|
||||
|
||||
testGroup :: TestTree
|
||||
testGroup = Tasty.QuickCheck.testProperties "Language.Json.Type" properties
|
Loading…
Add table
Add a link
Reference in a new issue