about summary refs log tree commit diff
path: root/users/grfn/xanthous/test/Xanthous/Data/MemoSpec.hs
blob: ad81f1984d8f3a96d2f13ff2ddeebf45ed55d947 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--------------------------------------------------------------------------------
module Xanthous.Data.MemoSpec (main, test) where
--------------------------------------------------------------------------------
import Test.Prelude
import Test.QuickCheck.Instances.Text ()
--------------------------------------------------------------------------------
import Xanthous.Data.Memo
--------------------------------------------------------------------------------

main :: IO ()
main = defaultMain test

test :: TestTree
test = testGroup "Xanthous.Data.MemoSpec"
  [ testGroup "getMemoized"
    [ testProperty "when key matches" $ \k v ->
        getMemoized @Int @Int k (memoizeWith k v) === Just v
    ]
  ]