adding all of botlist, initial add
[botlist.git] / botlistprojects / botspider / spider / tests / haskell / src / Tests / Data / TestQueue.hs
blob23a6df9fbaac0878abaf886994b48286af3ce2f4
1 --
2 -- Test Queue
4 module Tests.Data.TestQueue where
6 import Time
7 import Data.Time.Clock.POSIX
8 import Data.SpiderQueue.Queue
9 import Data.Binary (encodeFile, decodeFile)
11 runQueueTest = do
12 putStrLn "Build Simple Queue"
13 pt <- getPOSIXTime
14 let row = initQueueObject "12354343" (round pt)
15 q = initSpiderQueue (row : [])
16 putStrLn $ show(q) ++ show(row)
17 encodeFile "test.db" (q :: SpiderQueue)
18 -- Now read the database and print
19 newq <- decodeFile "test.db" :: IO SpiderQueue
20 putStrLn $ show(newq)
21 putStrLn "Done"