82ecd61f5c
Change-Id: I6c6847fac56f0a9a1a2209792e00a3aec5e672b9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10809 Autosubmit: aspen <root@gws.fyi> Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: lukegb <lukegb@tvl.fyi>
20 lines
891 B
Haskell
20 lines
891 B
Haskell
--------------------------------------------------------------------------------
|
|
module Xanthous.Data.NestedMapSpec (main, test) where
|
|
--------------------------------------------------------------------------------
|
|
import Test.Prelude
|
|
--------------------------------------------------------------------------------
|
|
import Test.QuickCheck.Instances.Semigroup ()
|
|
--------------------------------------------------------------------------------
|
|
import qualified Xanthous.Data.NestedMap as NM
|
|
--------------------------------------------------------------------------------
|
|
|
|
main :: IO ()
|
|
main = defaultMain test
|
|
|
|
test :: TestTree
|
|
test = testGroup "Xanthous.Data.NestedMap"
|
|
[ testProperty "insert/lookup" $ \nm ks v ->
|
|
let nm' = NM.insert ks v nm
|
|
in counterexample ("inserted: " <> show nm')
|
|
$ NM.lookup @Map @Int @Int ks nm' === Just (NM.Val v)
|
|
]
|