From 8b22145bf32c96067358193388a54621d3826628 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 30 Nov 2018 21:57:59 +0000 Subject: Restructure and add tests --- tests/test.hs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/test.hs (limited to 'tests') 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 -- cgit