aggreact/src-test/Main.hs
Yann Esposito (Yogsototh) 1bf856ea09
refacto of code
Type level black magic!

better naming

Even darker type level programming black magic

Fix the updatefields

Updated to usage typeclasses structure

update the Comments file

Added a working function

ignore .db files

It's happening!

Using the Handler pattern

Added search, need to think about non generic queries

Fixes, but unsatisfactory about search

Working system

Fixed tests

Fixed search to make it safer

Cleaner test

Added Show instances (will help for debug)

working code

add auto-test.sh script

Use ixset-typed for more typesafety

Working system with a "hole" in the abstraction
2019-01-09 16:32:16 +01:00

49 lines
1,013 B
Haskell

import Protolude
import Test.Tasty
-- import Test.Tasty.HUnit
-- import Test.Tasty.SmallCheck
import Database.Store.Backend.SQLiteTest
main :: IO ()
main = defaultMain $ testGroup "all-tests" tests
tests :: [TestTree]
tests =
[ testGroup "SQLite Store" testSQLiteGenerics
, testGroup "SQLite CRUD Store" testSQLiteCRUD
]
{-
tests :: [TestTree]
tests =
[ testGroup "SmallCheck" scTests
, testGroup "Unit tests" huTests
]
scTests :: [TestTree]
scTests =
[ testProperty "inc == succ" prop_succ
, testProperty "inc . negate == negate . pred" prop_pred
]
huTests :: [TestTree]
huTests =
[ testCase "Increment below TheAnswer" case_inc_below
, testCase "Decrement above TheAnswer" case_dec_above
]
prop_succ :: Int -> Bool
prop_succ n = inc n == succ n
prop_pred :: Int -> Bool
prop_pred n = inc (negate n) == negate (pred n)
case_inc_below :: Assertion
case_inc_below = inc 41 @?= (42 :: Int)
case_dec_above :: Assertion
case_dec_above = negate (inc (negate 43)) @?= (42 :: Int)
-}