mirror of
https://github.com/iritmaximus/haskell.git
synced 2026-10-12 19:13:39 +03:00
Set 9b Ex 9: faster tests
This commit is contained in:
+13
-2
@@ -25,7 +25,12 @@ tests = [ (1, "warmup", [ ex1_nextRow, ex1_nextCol ])
|
||||
, (6, "fixFirst", [ ex6_fixFirst_safeZone, ex6_fixFirst_dangerZone, ex6_fixFirst_outside ])
|
||||
, (7, "stackOps", [ ex7_continue, ex7_backtrack ])
|
||||
, (8, "nqueens_step", [ ex8_step_4, ex8_step_continue, ex8_step_backtrack ])
|
||||
, (9, "nqueens_finish", [ ex9_finish_small, ex9_finish_medium, ex9_finish_large ])
|
||||
, (9, "nqueens_finish", [ ex9_finish_small, ex9_finish_medium,
|
||||
ex9_finish_large_9,
|
||||
ex9_finish_large_10,
|
||||
ex9_finish_large_11,
|
||||
ex9_finish_large_12,
|
||||
ex9_finish_large_13])
|
||||
]
|
||||
|
||||
-- -- -- -- --
|
||||
@@ -449,4 +454,10 @@ m_finish_n n = $(testing [|finish n [(1,1)]|]) . was $ \qs ->
|
||||
]
|
||||
|
||||
ex9_finish_medium = forAllBlind (choose (5,8)) m_finish_n
|
||||
ex9_finish_large = forAllBlind (choose (9,13)) m_finish_n
|
||||
|
||||
-- separate tests for nicer time limit handling
|
||||
ex9_finish_large_9 = once $ m_finish_n 9
|
||||
ex9_finish_large_10 = once $ m_finish_n 10
|
||||
ex9_finish_large_11 = once $ m_finish_n 11
|
||||
ex9_finish_large_12 = once $ m_finish_n 12
|
||||
ex9_finish_large_13 = once $ m_finish_n 13
|
||||
|
||||
Reference in New Issue
Block a user