on 92b6021 help sign in
18 lines 594 B history raw
1module Test.TypeRep.Vector where
3import Prelude hiding (lookup)
5import Data.Functor.Identity (Identity (..))
7import Test.Tasty.Hspec
9import Data.TypeRep.Vector
11-- Simple test for 'lookup', 'insert' and 'size' functions.
12spec_insertLookup :: Spec
13spec_insertLookup =
14 describe "Lookup Test" $ do
15 it "returns the inserted element" $
16 lookup (fromList [TF (Identity 'a')]) `shouldBe` Just (Identity 'a')
17 it "returns the second inserted value of the same type" $
18 lookup (fromList [TF (Identity 'b'), TF (Identity 'a')]) `shouldBe` Just (Identity 'b')