mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2025-01-07 13:46:41 +03:00
rr-quickcheck: update tests for GHC 7.4.
This commit is contained in:
parent
727a2c6663
commit
dac7e2eb25
@ -16,6 +16,10 @@ build-type: Simple
|
||||
-- extra-source-files:
|
||||
cabal-version: >=1.10
|
||||
|
||||
flag ghc74-generic
|
||||
description: Enable for generic programming using old ghc. If true use ghc-prim.
|
||||
default: False
|
||||
|
||||
library
|
||||
exposed-modules:
|
||||
Test.Relational.QuickCheck.Model
|
||||
@ -32,6 +36,9 @@ library
|
||||
, persistable-record
|
||||
, relational-query
|
||||
, relational-query-HDBC
|
||||
if flag(ghc74-generic)
|
||||
build-depends: ghc-prim == 0.2.*
|
||||
|
||||
hs-source-dirs: src
|
||||
ghc-options: -Wall
|
||||
default-language: Haskell2010
|
||||
|
@ -7,7 +7,8 @@ module Test.Relational.QuickCheck.Tests (
|
||||
prop_join0, prop_join1,
|
||||
) where
|
||||
|
||||
import Test.QuickCheck (Property, ioProperty)
|
||||
import Test.QuickCheck (Property)
|
||||
import Test.QuickCheck.Property (morallyDubiousIOProperty)
|
||||
import Test.QuickCheck.Simple (Test, qcTest)
|
||||
import Control.Monad (unless)
|
||||
import Data.List (sort)
|
||||
@ -35,7 +36,7 @@ propQueryResult :: (Eq a, Show a, FromSql SqlValue a, IConnection conn)
|
||||
-> [a]
|
||||
-> Property
|
||||
propQueryResult connect initialize select expect =
|
||||
ioProperty . withConnectionIO' connect $ \conn -> do
|
||||
morallyDubiousIOProperty . withConnectionIO' connect $ \conn -> do
|
||||
initialize conn
|
||||
qresult <- runQuery' conn select ()
|
||||
let judge = qresult == expect
|
||||
|
Loading…
Reference in New Issue
Block a user