Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 00688d24eb
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 28 lines (21 sloc) 0.838 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
{-# LANGUAGE TemplateHaskell #-}

module Main where

import Test.Framework.TH
import Test.HUnit
import Test.QuickCheck
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck2
import System.IO.Unsafe
import qualified Data.Vector as V
import qualified Data.Text.Lazy as LT

import Data.Foldable as F
import Data.Monoid
import qualified Data.AList as AL

main = $(defaultMainGenerator)

case_fromToList = (AL.toList . AL.fromList) [1,2,3] @?= [1,2,3]
case_take4undefined = (take 4 . F.toList . AL.fromList) [0,1,2,3,undefined] @?= [0,1,2,3]
case_take4undefined2 = (length . take 3 . F.toList) lst @?= 3
    where
        lst = (AL.singleton 0) `mappend` (AL.singleton 1) `mappend` (AL.singleton 2) `mappend` undefined

case_head = (AL.head . AL.fromList) [2,4] @?= 2
case_tail = (AL.tail . AL.fromList) [2,4] @?= 4
Something went wrong with that request. Please try again.