diff options
Diffstat (limited to 'tests/Property.hs')
-rw-r--r-- | tests/Property.hs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/Property.hs b/tests/Property.hs new file mode 100644 index 0000000..ba9152e --- /dev/null +++ b/tests/Property.hs @@ -0,0 +1,20 @@ +module Property (propertyTests) where + +import Data.Graph.Inductive +import Test.Tasty +import Test.Tasty.QuickCheck as QC +import Test.VeriFuzz + +newtype TestGraph = TestGraph { getGraph :: Gr Gate ()} + deriving (Show) + +instance QC.Arbitrary TestGraph where + arbitrary = TestGraph <$> randomDAG 100 + +simpleGraph = QC.testProperty "simple graph generation" $ + \graph -> isSimple (getGraph (graph :: TestGraph)) == True + +propertyTests :: TestTree +propertyTests = testGroup "Property" + [ simpleGraph + ] |