haskell-names 0.1 → 0.1.1
raw patch · 2 files changed
+11/−11 lines, 2 filesdep +tastydep +tasty-goldendep −test-frameworkdep −test-framework-golden
Dependencies added: tasty, tasty-golden
Dependencies removed: test-framework, test-framework-golden
Files
- haskell-names.cabal +4/−4
- tests/run.hs +7/−7
haskell-names.cabal view
@@ -1,5 +1,5 @@ Name: haskell-names-Version: 0.1+Version: 0.1.1 License: BSD3 Author: Roman Cheplyaka, Lennart Augustsson Maintainer: Roman Cheplyaka <roma@ro-che.info>@@ -232,7 +232,7 @@ source-repository this type: git location: git://github.com/haskell-suite/haskell-names.git- tag: v0.1+ tag: v0.1.1 Library Default-Language: Haskell2010@@ -294,8 +294,8 @@ , aeson , bytestring , haskell-packages- , test-framework- , test-framework-golden >= 1.1.2+ , tasty+ , tasty-golden , filemanip , utf8-string , pretty-show
tests/run.hs view
@@ -1,8 +1,8 @@ {-# LANGUAGE FlexibleInstances, OverlappingInstances, ImplicitParams, MultiParamTypeClasses #-}-import Test.Framework hiding (defaultMain)-import Test.Golden-import Test.Golden.Console+import Test.Tasty hiding (defaultMain)+import Test.Tasty.Golden+import Test.Tasty.Golden.Manage import System.FilePath import System.FilePath.Find@@ -35,7 +35,7 @@ type MT = ModuleT Symbols IO -main = defaultMain =<< tests+main = defaultMain . testGroup "Tests" =<< tests tests = liftM concat . sequence $@@ -60,7 +60,7 @@ out = file <.> "out" run = writeFile out $ ppShow iface -exportTests :: MT Test+exportTests :: MT TestTree exportTests = do testFiles <- liftIO $ find (return True) (extension ==? ".hs") "tests/exports" parsed <- liftIO $ mapM parseAndPrepare testFiles@@ -78,7 +78,7 @@ ---------------------------------------------------------- -- Import test: parse a source file, dump its global table -----------------------------------------------------------importTest :: FilePath -> Global.Table -> Test+importTest :: FilePath -> Global.Table -> TestTree importTest file tbl = goldenVsFile file golden out run where@@ -93,7 +93,7 @@ let extSet = moduleExtensions lang exts mod snd <$> processImports extSet (getImports mod) -importTests :: MT Test+importTests :: MT TestTree importTests = do testFiles <- liftIO $ find (return True) (extension ==? ".hs") "tests/imports" filesAndTables <- forM testFiles $ \file -> (,) file <$> getGlobalTable file