Add start of specs for auctions.

[?]
Oct 19, 2015, 4:55 AM
UUR6SMCAJMA7O3ZFUCQMPZFDDIPUVQ5IHUAC5F252YVD6H3JIKPQC

Dependencies

  • [2] 2XQD6KKK Add invitation logic and clean up DBProg error handling.
  • [3] KNSI575V Cleanup of EventLog types.
  • [4] TJEUE7TY Added OverloadedStrings to eliminate Text fiddling.
  • [5] 4U7F3CPI THE GREAT RENAMING OF THINGS!
  • [6] 7KZP4RHZ Switch from Data.Time to Data.Thyme
  • [7] NMWWP4ZN Trying out Hspec
  • [8] 4SCFOJGN Specs for recovering intervals from the log now pass.
  • [9] EMVTF2IW WIP moving back to snap.
  • [10] 5DRIWGLU Improving TimeLog specs
  • [11] 64C6AWH6 Rename Ananke -> Quixotic, project reboot.
  • [*] QMRKFEPG Refactor QDB to use a free monad algebra instead.
  • [*] NVOCQVAS Initial failing tests.

Change contents

  • edit in aftok.cabal at line 30
    [3.429]
    [13.1]
    Aftok.Types
  • edit in aftok.cabal at line 85
    [2.1115]
    [3.1621]
    , hourglass
  • edit in aftok.cabal at line 88
    [3.1651]
    [2.1116]
    , network-bitcoin
  • edit in aftok.cabal at line 93
    [3.2944]
    [3.2945]
    , uuid
  • file addition: AuctionSpec.hs (----------)
    [3.3462]
    {-# OPTIONS_GHC -Wwarn #-}
    module Aftok.AuctionSpec (main, spec) where
    import ClassyPrelude
    import Aftok
    import Aftok.Auction
    import Aftok.Types
    import Data.Hourglass
    import Data.UUID
    import Test.Hspec
    import Test.QuickCheck
    spec :: Spec
    spec =
    describe "bid ordering" $
    it "ensures that bids with lowest seconds/btc ratio are first" $
    let testB1 = Bid (UserId nil) (Seconds 60) (Satoshi 1000) undefined
    testB2 = Bid (UserId nil) (Seconds 60) (Satoshi 100) undefined
    testB3 = Bid (UserId nil) (Seconds 90) (Satoshi 100) undefined
    in do
    bidOrder testB1 testB2 `shouldBe` LT
    bidOrder testB2 testB3 `shouldBe` LT
    main :: IO ()
    main = hspec spec
  • replacement in test/Aftok/TimeLogSpec.hs at line 6
    [3.149][3.3521:3552]()
    module Aftok.TimeLogSpec where
    [3.149]
    [3.1659]
    module Aftok.TimeLogSpec (main, spec) where
  • replacement in test/Aftok/TimeLogSpec.hs at line 99
    [3.552][3.552:638]()
    widx' = fmap (L.fromList . mergeAdjacent . sortOn _start . L.toList) widx
    [3.552]
    [3.4506]
    widx' = fmap (L.fromList . mergeAdjacent . sortOn I._start . L.toList) widx