From 599b247ebc77d367c7d2dcf11d2a01f7dfc12611 Mon Sep 17 00:00:00 2001 From: Kei Hibino Date: Thu, 22 Dec 2016 08:58:57 +0900 Subject: [PATCH] renamed. --- .../src/Test/Relational/QuickCheck/Tests.hs | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/rr-quickcheck/src/Test/Relational/QuickCheck/Tests.hs b/rr-quickcheck/src/Test/Relational/QuickCheck/Tests.hs index 601361b9..c1a5433a 100644 --- a/rr-quickcheck/src/Test/Relational/QuickCheck/Tests.hs +++ b/rr-quickcheck/src/Test/Relational/QuickCheck/Tests.hs @@ -1,7 +1,7 @@ {-# LANGUAGE FlexibleContexts #-} module Test.Relational.QuickCheck.Tests ( - qPred1, qJoin1, + prop_pred0, prop_join0, ) where import Test.QuickCheck (Property, ioProperty) @@ -24,13 +24,13 @@ initializeTable :: (IConnection conn, TableDerivable a, ToSql SqlValue a) -> IO () initializeTable conn xs = mapM_ (runInsert conn $ derivedInsert id') xs -propQueryList :: (Eq a, Show a, FromSql SqlValue a, IConnection conn) - => IO conn - -> (conn -> IO ()) - -> Query () a - -> [a] - -> Property -propQueryList connect initialize select expect = +propQueryResult :: (Eq a, Show a, FromSql SqlValue a, IConnection conn) + => IO conn + -> (conn -> IO ()) + -> Query () a + -> [a] + -> Property +propQueryResult connect initialize select expect = ioProperty . withConnectionIO' connect $ \conn -> do initialize conn qresult <- runQuery' conn select () @@ -39,13 +39,13 @@ propQueryList connect initialize select expect = rollback conn return judge -qPred1 :: IConnection conn - => IO conn - -> D (Pred A) - -> Ranged A - -> Property -qPred1 connect pa0 as0 = - propQueryList connect (`initializeTable` as) select expect +prop_pred0 :: IConnection conn + => IO conn + -> D (Pred A) + -> Ranged A + -> Property +prop_pred0 connect pa0 as0 = + propQueryResult connect (`initializeTable` as) select expect where pa = unD pa0 as = runRanged as0 @@ -58,16 +58,16 @@ qPred1 connect pa0 as0 = sort [ a | a <- as, predHask a pa ] -qJoin1 :: IConnection conn - => IO conn - -> Selector A - -> Selector B - -> Cmp - -> Ranged A - -> Ranged B - -> Property -qJoin1 connect pa pb cmp as0 bs0 = - propQueryList connect initialize select expect +prop_join0 :: IConnection conn + => IO conn + -> Selector A + -> Selector B + -> Cmp + -> Ranged A + -> Ranged B + -> Property +prop_join0 connect pa pb cmp as0 bs0 = + propQueryResult connect initialize select expect where as = runRanged as0 bs = runRanged bs0