diff options
-rw-r--r-- | app/Main.hs (renamed from src/Main.hs) | 0 | ||||
-rw-r--r-- | tests/test.hs | 17 | ||||
-rw-r--r-- | verifuzz.cabal | 26 |
3 files changed, 34 insertions, 9 deletions
diff --git a/src/Main.hs b/app/Main.hs index d41d46b..d41d46b 100644 --- a/src/Main.hs +++ b/app/Main.hs diff --git a/tests/test.hs b/tests/test.hs new file mode 100644 index 0000000..3255c72 --- /dev/null +++ b/tests/test.hs @@ -0,0 +1,17 @@ +import Test.Tasty +import Test.Tasty.HUnit +import Test.Tasty.QuickCheck as QC + +unitTests = testGroup "Unit tests" + [ testCase "List comparison (different length)" $ + [1, 2, 3] `compare` [1,2] @?= GT + + -- the following test does not hold + , testCase "List comparison (same length)" $ + [1, 2, 3] `compare` [1,2,2] @?= LT + ] + +tests :: TestTree +tests = testGroup "Tests" [unitTests] + +main = defaultMain tests diff --git a/verifuzz.cabal b/verifuzz.cabal index 3f2e933..c6795a5 100644 --- a/verifuzz.cabal +++ b/verifuzz.cabal @@ -5,9 +5,9 @@ version: 0.1.0.0 homepage: https://github.com/githubuser/verifuzz#readme license: BSD3 license-file: LICENSE -author: Author name here -maintainer: example@example.com -copyright: 2018 Author name here +author: Yann Herklotz +maintainer: ymherklotz@gmail.com +copyright: 2018 Yann Herklotz category: Web build-type: Simple cabal-version: >=1.10 @@ -25,19 +25,27 @@ library , QuickCheck , fgl , text - , mwc-random , random , lens executable verifuzz - hs-source-dirs: src + hs-source-dirs: app main-is: Main.hs default-language: Haskell2010 - other-modules: Test.VeriFuzz build-depends: base >= 4.7 && < 5 - , QuickCheck + , verifuzz , graphviz , fgl , text - , mwc-random - , random + +test-suite verifuzz-test + default-language: Haskell2010 + type: exitcode-stdio-1.0 + hs-source-dirs: tests + main-is: test.hs + other-modules: Test.VeriFuzz + build-depends: base >= 4 && < 5 + , verifuzz + , tasty >= 0.7 + , tasty-hunit >= 0.10 + , tasty-quickcheck >= 0.10 |