Unverified Commit 46e4aa58 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Support the latest version of 'tasty'.

parent 5cf99433
......@@ -9,11 +9,11 @@ tests :: [TestTree]
tests = [testCase "Locale Encoding" case_Locale_Encoding]
case_Locale_Encoding :: Assertion
case_Locale_Encoding = assert $ do
case_Locale_Encoding = do
let str = "\0252"
(r, w) <- createPipe
hSetEncoding w localeEncoding
out <- hGetContents r
hPutStr w str
hClose w
return $! out == str
assertEqual "createPipe should support Unicode roundtripping" str out
......@@ -661,8 +661,8 @@ executable cabal
random,
tagged,
tar,
tasty,
tasty-hunit,
tasty >= 0.12,
tasty-hunit >= 0.10,
tasty-quickcheck,
time,
zlib
......@@ -722,8 +722,8 @@ Test-Suite unit-tests
zlib,
network-uri,
network,
tasty,
tasty-hunit,
tasty >= 0.12,
tasty-hunit >= 0.10,
tasty-quickcheck,
tagged,
QuickCheck >= 2.8.2
......@@ -755,8 +755,8 @@ Test-Suite memory-usage-tests
containers,
deepseq,
tagged,
tasty,
tasty-hunit
tasty >= 0.12,
tasty-hunit >= 0.10
if !(arch(arm) && impl(ghc < 7.6))
ghc-options: -threaded
......@@ -783,7 +783,7 @@ Test-Suite solver-quickcheck
containers,
deepseq >= 1.2,
hashable,
tasty,
tasty >= 0.12,
tasty-quickcheck,
QuickCheck >= 2.8.2,
pretty-show
......@@ -813,8 +813,8 @@ test-suite integration-tests2
directory,
edit-distance,
filepath,
tasty,
tasty-hunit,
tasty >= 0.12,
tasty-hunit >= 0.10,
tagged
if !flag(lib)
......
......@@ -1641,7 +1641,7 @@ expectException expected action = do
res <- try action
case res of
Left e -> return e
Right _ -> throwIO $ HUnitFailure $ "expected an exception " ++ expected
Right _ -> throwIO $ HUnitFailure Nothing $ "expected an exception " ++ expected
expectPackagePreExisting :: ElaboratedInstallPlan -> BuildOutcomes -> PackageId
-> IO InstalledPackageInfo
......@@ -1682,7 +1682,7 @@ expectPackageFailed plan buildOutcomes pkgid = do
unexpectedBuildResult :: String -> ElaboratedPlanPackage
-> Maybe (Either BuildFailure BuildResult) -> IO a
unexpectedBuildResult expected planpkg buildResult =
throwIO $ HUnitFailure $
throwIO $ HUnitFailure Nothing $
"expected to find " ++ display (packageId planpkg) ++ " in the "
++ expected ++ " state, but it is actually in the " ++ actual ++ " state."
where
......@@ -1700,10 +1700,10 @@ expectPlanPackage plan pkgid =
| pkg <- InstallPlan.toList plan
, packageId pkg == pkgid ] of
[pkg] -> return pkg
[] -> throwIO $ HUnitFailure $
[] -> throwIO $ HUnitFailure Nothing $
"expected to find " ++ display pkgid
++ " in the install plan but it's not there"
_ -> throwIO $ HUnitFailure $
_ -> throwIO $ HUnitFailure Nothing $
"expected to find only one instance of " ++ display pkgid
++ " in the install plan but there's several"
......
......@@ -818,7 +818,7 @@ expectMonitorChanged root monitor key = do
res <- checkChanged root monitor key
case res of
MonitorChanged reason -> return reason
MonitorUnchanged _ _ -> throwIO $ HUnitFailure "expected change"
MonitorUnchanged _ _ -> throwIO $ HUnitFailure Nothing "expected change"
expectMonitorUnchanged :: (Binary a, Binary b)
=> RootPath -> FileMonitor a b -> a
......@@ -826,7 +826,7 @@ expectMonitorUnchanged :: (Binary a, Binary b)
expectMonitorUnchanged root monitor key = do
res <- checkChanged root monitor key
case res of
MonitorChanged _reason -> throwIO $ HUnitFailure "expected no change"
MonitorChanged _reason -> throwIO $ HUnitFailure Nothing "expected no change"
MonitorUnchanged b files -> return (b, files)
checkChanged :: (Binary a, Binary b)
......
......@@ -103,12 +103,12 @@ testparse :: String -> IO FilePathGlob
testparse s =
case simpleParse s of
Just p -> return p
Nothing -> throwIO $ HUnitFailure ("expected parse of: " ++ s)
Nothing -> throwIO $ HUnitFailure Nothing ("expected parse of: " ++ s)
parseFail :: String -> Assertion
parseFail s =
case simpleParse s :: Maybe FilePathGlob of
Just _ -> throwIO $ HUnitFailure ("expected no parse of: " ++ s)
Just _ -> throwIO $ HUnitFailure Nothing ("expected no parse of: " ++ s)
Nothing -> return ()
instance Arbitrary FilePathGlob where
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment