1
1
module Main
2
2
3
+ import System
4
+ import System.Directory
5
+ import System.File
6
+
3
7
import Test.Golden
4
8
5
9
%default covering
@@ -199,12 +203,8 @@ idrisTests = MkTestPool "Misc" [] Nothing
199
203
-- golden file testing
200
204
" golden001" ]
201
205
202
- typeddTests : TestPool
203
- typeddTests = MkTestPool " Type Driven Development" [] Nothing
204
- [ " chapter01" , " chapter02" , " chapter03" , " chapter04" , " chapter05"
205
- , " chapter06" , " chapter07" , " chapter08" , " chapter09" , " chapter10"
206
- , " chapter11" , " chapter12" , " chapter13" , " chapter14"
207
- ]
206
+ typeddTests : IO TestPool
207
+ typeddTests = testsInDir " typedd-book" (const True ) " Type Driven Development" [] Nothing
208
208
209
209
chezTests : TestPool
210
210
chezTests = MkTestPool " Chez backend" [] (Just Chez )
@@ -226,12 +226,8 @@ chezTests = MkTestPool "Chez backend" [] (Just Chez)
226
226
, " channels001" , " channels002" , " channels003" , " channels004" , " channels005"
227
227
]
228
228
229
- refcTests : TestPool
230
- refcTests = MkTestPool " Reference counting C backend" [] (Just C )
231
- [ " refc001" , " refc002"
232
- , " strings" , " integers" , " doubles"
233
- , " buffer" , " clock" , " args"
234
- ]
229
+ refcTests : IO TestPool
230
+ refcTests = testsInDir " refc" (const True ) " Reference counting C backend" [] (Just C )
235
231
236
232
racketTests : TestPool
237
233
racketTests = MkTestPool " Racket backend" [] (Just Racket )
@@ -264,57 +260,32 @@ nodeTests = MkTestPool "Node backend" [] (Just Node)
264
260
, " integers"
265
261
]
266
262
267
- vmcodeInterpTests : TestPool
268
- vmcodeInterpTests = MkTestPool " VMCode interpreter" [] Nothing
269
- [ " basic001"
270
- ]
263
+ vmcodeInterpTests : IO TestPool
264
+ vmcodeInterpTests = testsInDir " vmcode" (const True ) " VMCode interpreter" [] Nothing
271
265
272
- ideModeTests : TestPool
273
- ideModeTests = MkTestPool " IDE mode" [] Nothing
274
- [ " ideMode001" , " ideMode002" , " ideMode003" , " ideMode004" , " ideMode005"
275
- ]
266
+ ideModeTests : IO TestPool
267
+ ideModeTests = testsInDir " ideMode" (const True ) " IDE mode" [] Nothing
276
268
277
- preludeTests : TestPool
278
- preludeTests = MkTestPool " Prelude library" [] Nothing
279
- [ " reg001"
280
- ]
269
+ preludeTests : IO TestPool
270
+ preludeTests = testsInDir " prelude" (const True ) " Prelude library" [] Nothing
281
271
282
- templateTests : TestPool
283
- templateTests = MkTestPool " Test templates" [] Nothing
284
- [ " simple-test" , " ttimp" , " with-ipkg"
285
- ]
272
+ templateTests : IO TestPool
273
+ templateTests = testsInDir " templates" (const True ) " Test templates" [] Nothing
286
274
287
275
-- base library tests are run against
288
276
-- each codegen supported and to keep
289
277
-- things simple it's all one test group
290
278
-- that only runs if all backends are
291
279
-- available.
292
- baseLibraryTests : TestPool
293
- baseLibraryTests = MkTestPool " Base library" [Chez , Node ] Nothing
294
- [ " control_app001"
295
- , " system_file001"
296
- , " system_info_os001"
297
- , " system_system"
298
- , " data_bits001"
299
- , " data_string_lines001"
300
- , " data_string_unlines001"
301
- , " system_directory"
302
- , " system_errno"
303
- , " system_info001"
304
- , " system_signal001" , " system_signal002" , " system_signal003" , " system_signal004"
305
- ]
280
+ baseLibraryTests : IO TestPool
281
+ baseLibraryTests = testsInDir " base" (const True ) " Base library" [Chez , Node ] Nothing
306
282
307
283
-- same behavior as `baseLibraryTests`
308
- contribLibraryTests : TestPool
309
- contribLibraryTests = MkTestPool " Contrib library" [Chez , Node ] Nothing
310
- [ " json_001"
311
- ]
284
+ contribLibraryTests : IO TestPool
285
+ contribLibraryTests = testsInDir " contrib" (const True ) " Contrib library" [Chez , Node ] Nothing
312
286
313
- codegenTests : TestPool
314
- codegenTests = MkTestPool " Code generation" [] Nothing
315
- [ " con001"
316
- , " builtin001"
317
- ]
287
+ codegenTests : IO TestPool
288
+ codegenTests = testsInDir " codegen" (const True ) " Code generation" [] Nothing
318
289
319
290
main : IO ()
320
291
main = runner $
@@ -334,18 +305,18 @@ main = runner $
334
305
, testPaths " idris2" idrisTestsBuiltin
335
306
, testPaths " idris2" idrisTestsEvaluator
336
307
, testPaths " idris2" idrisTests
337
- , testPaths " typedd-book " typeddTests
338
- , testPaths " ideMode " ideModeTests
339
- , testPaths " prelude " preludeTests
340
- , testPaths " base " baseLibraryTests
341
- , testPaths " contrib " contribLibraryTests
308
+ , ! typeddTests
309
+ , ! ideModeTests
310
+ , ! preludeTests
311
+ , ! baseLibraryTests
312
+ , ! contribLibraryTests
342
313
, testPaths " chez" chezTests
343
- , testPaths " refc " refcTests
314
+ , ! refcTests
344
315
, testPaths " racket" racketTests
345
316
, testPaths " node" nodeTests
346
- , testPaths " vmcode " vmcodeInterpTests
347
- , testPaths " templates " templateTests
348
- , testPaths " codegen " codegenTests
317
+ , ! vmcodeInterpTests
318
+ , ! templateTests
319
+ , ! codegenTests
349
320
]
350
321
++ map (testPaths " allbackends" . idrisTestsAllBackends) [Chez , Node , Racket ]
351
322
0 commit comments