From 60e73c0a0ce3b887562cc6a3409bef3fef8469f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Crist=C3=B3v=C3=A3o?= Date: Thu, 19 Sep 2013 09:31:30 +0100 Subject: [PATCH] Sum returns different types on different backends. --- test/Test.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/Test.hs b/test/Test.hs index b084802..35636ae 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -323,7 +323,13 @@ main = do ret <- select $ from $ \p-> return $ joinV $ sum_ (p ^. PersonAge) +#if defined(WITH_POSTGRESQL) + liftIO $ ret `shouldBe` [ Value $ Just (36 + 17 + 17 :: Rational ) ] +#elif defined(WITH_MYSQL) + liftIO $ ret `shouldBe` [ Value $ Just (36 + 17 + 17 :: Double ) ] +#else liftIO $ ret `shouldBe` [ Value $ Just (36 + 17 + 17 :: Int) ] +#endif it "works with avg_" $ run $ do