git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Update the support modules list in the tests

Also add comment explaining what the list actually does

commit06e433255990ccb193e36113f8559b141f82f247 authorGary Burgess <gary.burgess@gmail.com> dateSun 1 May 2016, 23:00 (10 years ago) parent69f8b3e
3 files changed+43−49
tests/TestCompiler.hs−12 tests/TestPsci.hs+2−37 tests/TestUtils.hs+41
tests/TestCompiler.hs−12
@@ -180,15 +180,3 @@ assertDoesNotCompile inputFiles foreigns = do
180180
181181 trim =
182182 dropWhile isSpace >>> reverse >>> dropWhile isSpace >>> reverse
183−
184−supportModules :: [String]
185−supportModules =
186− [ "Control.Monad.Eff.Class"
187− , "Control.Monad.Eff.Console"
188− , "Control.Monad.Eff"
189− , "Control.Monad.Eff.Unsafe"
190− , "Control.Monad.ST"
191− , "Data.Function"
192− , "Prelude"
193− , "Test.Assert"
194− ]
tests/TestPsci.hs+2−37
@@ -28,6 +28,8 @@ import PSCi.Module (loadAllModules)
2828import PSCi.Completion
2929import PSCi.Types
3030
31+import TestUtils (supportModules)
32+
3133main :: IO ()
3234main = do
3335 Counts{..} <- runTestTT allTests
@@ -144,40 +146,3 @@ controlMonadSTasST :: ImportedModule
144146controlMonadSTasST = (s "Control.Monad.ST", P.Implicit, Just (s "ST"))
145147 where
146148 s = P.moduleNameFromString
147−
148−supportModules :: [String]
149−supportModules =
150− [ "Control.Applicative"
151− , "Control.Apply"
152− , "Control.Bind"
153− , "Control.Category"
154− , "Control.Monad"
155− , "Control.Monad.Eff"
156− , "Control.Monad.Eff.Class"
157− , "Control.Monad.Eff.Console"
158− , "Control.Monad.Eff.Unsafe"
159− , "Control.Monad.ST"
160− , "Control.Semigroupoid"
161− , "Data.Boolean"
162− , "Data.BooleanAlgebra"
163− , "Data.Bounded"
164− , "Data.CommutativeRing"
165− , "Data.Eq"
166− , "Data.EuclideanRing"
167− , "Data.Field"
168− , "Data.Function"
169− , "Data.Function.Uncurried"
170− , "Data.Functor"
171− , "Data.HeytingAlgebra"
172− , "Data.Ord"
173− , "Data.Ord.Unsafe"
174− , "Data.Ordering"
175− , "Data.Ring"
176− , "Data.Semigroup"
177− , "Data.Semiring"
178− , "Data.Show"
179− , "Data.Unit"
180− , "Data.Void"
181− , "Prelude"
182− , "Test.Assert"
183− ]
tests/TestUtils.hs+41
@@ -38,6 +38,47 @@ updateSupportCode = do
3838 callProcess "node_modules/.bin/bower" ["--allow-root", "install", "--config.interactive=false"]
3939 setCurrentDirectory "../.."
4040
41+-- |
42+-- The support modules that should be cached between test cases, to avoid
43+-- excessive rebuilding.
44+--
45+supportModules :: [String]
46+supportModules =
47+ [ "Control.Applicative"
48+ , "Control.Apply"
49+ , "Control.Bind"
50+ , "Control.Category"
51+ , "Control.Monad.Eff.Class"
52+ , "Control.Monad.Eff.Console"
53+ , "Control.Monad.Eff.Unsafe"
54+ , "Control.Monad.Eff"
55+ , "Control.Monad.ST"
56+ , "Control.Monad"
57+ , "Control.Semigroupoid"
58+ , "Data.Boolean"
59+ , "Data.BooleanAlgebra"
60+ , "Data.Bounded"
61+ , "Data.CommutativeRing"
62+ , "Data.Eq"
63+ , "Data.EuclideanRing"
64+ , "Data.Field"
65+ , "Data.Function.Uncurried"
66+ , "Data.Function"
67+ , "Data.Functor"
68+ , "Data.HeytingAlgebra"
69+ , "Data.Ord.Unsafe"
70+ , "Data.Ord"
71+ , "Data.Ordering"
72+ , "Data.Ring"
73+ , "Data.Semigroup"
74+ , "Data.Semiring"
75+ , "Data.Show"
76+ , "Data.Unit"
77+ , "Data.Void"
78+ , "Prelude"
79+ , "Test.Assert"
80+ ]
81+
4182pushd :: forall a. FilePath -> IO a -> IO a
4283pushd dir act = do
4384 original <- getCurrentDirectory