Skip to content

Commit

Permalink
Make test suite compatible with GHC > 6.8.
Browse files Browse the repository at this point in the history
  • Loading branch information
beastaugh committed Apr 15, 2011
1 parent 272c593 commit dabfd79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions testsrc/TestSbasics.hs
Expand Up @@ -121,8 +121,7 @@ testWithTransaction = dbTestCase (\dbh ->
sFetchAllRows qrysth >>= (assertEqual "initial commit" [[Just "0"]])

-- Let's try a rollback.
try $ withTransaction dbh (\_ -> do sExecuteMany sth rows
fail "Foo")
try $ withTransaction dbh (const $ sExecuteMany sth rows >> fail "Foo") :: IO (Either SomeException a)
sExecute qrysth []
sFetchAllRows qrysth >>= (assertEqual "rollback" [[Just "0"]])

Expand Down
3 changes: 1 addition & 2 deletions testsrc/Testbasics.hs
Expand Up @@ -138,8 +138,7 @@ testWithTransaction = dbTestCase (\dbh ->
fetchAllRows qrysth >>= (assertEqual "initial commit" [[toSql "0"]])

-- Let's try a rollback.
try $ withTransaction dbh (\_ -> do executeMany sth rows
fail "Foo")
try $ withTransaction dbh (const $ executeMany sth rows >> fail "Foo") :: IO (Either SomeException a)
execute qrysth []
fetchAllRows qrysth >>= (assertEqual "rollback" [[SqlString "0"]])

Expand Down

0 comments on commit dabfd79

Please sign in to comment.