Commit Graph

62 Commits

Author SHA1 Message Date
Neil Brown
416e385017 Added labels to all the QuickCheck tests to make it easier to see which one has failed 2008-02-05 22:15:17 +00:00
Neil Brown
fa1e9a6a08 Rearranged FlowGraph and fixed the tests
Previously, most of the flow-graph building functions were inside the where clause of buildFlowGraph.  They have been moved to the top-level (with only a few small changes to make this possible - the main one being to store the labelling functions in a reader monad, which only required changing a couple of lines) and used by an additional buildFlowGraphP function, that is now used by the tests to make them work simply.  None of the new top-level functions except buildFlowGraphP are exported from FlowGraph.
2008-02-05 22:04:49 +00:00
Neil Brown
acd57d74de Changed the A.Structured type to be parameterised
This patch is actually an amalgam of multiple (already large) patches.  Those patches conflicted (parameterised Structured vs. changes to usage checking and FlowGraph) and encountered a nasty bug in darcs 1 involving exponential time (see http://wiki.darcs.net/DarcsWiki/ConflictsFAQ for more details).  Reasoning that half an hour (of 100% CPU use) was too long to apply patches, I opted to re-record the parameterised Structured changes as this new large patch.  Here are the commit messages originally used for the patches (which, as mentioned, were already large patches):

A gigantic patch switching all the non-test modules over to using parameterised A.Structured
Changed the FlowGraph module again to handle any sort of Structured you want to pass to it (mainly for testing)
A further gigantic patch changing all the tests to work with the new parameterised Structured
Fixed a nasty bug involving functions being named incorrectly inside transformInputCase
Added a hand-written instance of Data for Structured that allows us to use ext1M properly
Fixed a few warnings in the code
2008-02-05 19:40:27 +00:00
Neil Brown
fdb612123c Added tests for parallel replicators in the flow-graph 2008-02-01 14:44:50 +00:00
Neil Brown
cb9aa03612 Fixed a nasty problem involving mixing the Meta tags while building the flow-graph, and added a comment about it 2008-02-01 14:34:17 +00:00
Neil Brown
d3ad2e7af6 Added a couple more tests for empty replicated SEQs that show up a bug 2008-02-01 11:45:05 +00:00
Neil Brown
c663109378 Corrected how CASE options are handled in the flow-graph, and adjusted the accompanying tests 2008-02-01 11:34:03 +00:00
Neil Brown
2beda004b3 Corrected some more tests relating to the way empty A.Severals are handled 2008-02-01 11:21:43 +00:00
Neil Brown
e9a2143a28 Tweaked a slightly misleading error message when flow-graph tests fail 2008-02-01 11:14:54 +00:00
Neil Brown
5eb5a4c979 Corrected some tests to reflect the new way that empty A.Several items are handled when building the flow-graph 2008-02-01 11:12:31 +00:00
Neil Brown
0672730894 Changed the way PARs are built up in the flow-graph, but haven't yet fixed the tests 2008-02-01 10:39:17 +00:00
Neil Brown
8fb60ff511 Added another test for PAR in FlowGraphTest 2008-01-30 20:47:27 +00:00
Neil Brown
5306e87463 Changed the tests for PAR in FlowGraphTest to match the intended new scheme 2008-01-30 20:37:47 +00:00
Neil Brown
a9427fe421 Corrected one test for SEQ in FlowGraphTest, and added another 2008-01-30 20:37:15 +00:00
Neil Brown
76e3a9b615 Corrected FlowGraphTest so it generates replicators inside IFs, not CASEs 2008-01-30 20:16:05 +00:00
Neil Brown
b3cd170840 Fixed an oversight with duplicated Meta tags in testSeq in FlowGraphTest 2008-01-30 19:47:39 +00:00
Neil Brown
0f0be6e4a3 Added support for replicators to the quickcheck tests (actually applying the modification functions) 2008-01-30 19:14:33 +00:00
Neil Brown
c2c6bf24f8 Changed the QuickCheck flow-graph generators to generate a Process as the top level, rather than Structured, to make the test input more interesting 2008-01-30 18:57:00 +00:00
Neil Brown
0dc4b81be8 Corrected the item count for replicators in the QuickCheck FlowGraph tests 2008-01-30 18:56:33 +00:00
Neil Brown
7c811f347c Added a couple of tests for sequential replicators 2008-01-30 13:50:28 +00:00
Neil Brown
b6132d6431 Added replicators to the flow graphs generated for the QuickCheck tests 2008-01-30 13:50:07 +00:00
Neil Brown
e94826c64e Added a function to GraphLabelFuncs for labelling replicators 2008-01-30 12:43:28 +00:00
Neil Brown
28fd400d89 Adjusted the FlowGraph tests to check the roots of the graph, and added in the new root nodes where appropriate 2008-01-29 20:06:33 +00:00
Neil Brown
12b1617fec Added a new labelling function to FlowGraph for labelling the arguments of functions/processes 2008-01-29 20:05:38 +00:00
Neil Brown
5567d8cee0 Changed FlowGraph to keep a record of all the root nodes in the tree and return them in a list 2008-01-29 12:46:14 +00:00
Neil Brown
7c4b87e221 Added tests for proc specifications in FlowGraphTest and correctly an earlier test to not use an undefined specification 2008-01-26 18:48:49 +00:00
Neil Brown
3548167a83 Changed the testGraph function in FlowGraphTest to add a variant that takes an A.Structured directly 2008-01-26 18:48:09 +00:00
Neil Brown
41fb90dc33 Added labels to the tests in FlowGraphTest 2008-01-26 18:46:16 +00:00
Neil Brown
bdda623d7e Added types to all the cases where the monomorhpism restriction applied 2008-01-26 20:51:11 +00:00
Neil Brown
86b8185b1f Added a few more helper functions to the Utils module 2008-01-25 16:12:20 +00:00
Neil Brown
140bd94ce3 Added various (QuickCheck) Result helper functions to the TestUtils module 2007-12-13 23:51:49 +00:00
Neil Brown
26dd2fa5c4 Renamed the TestUtil and TreeUtil modules to TestUtils and TreeUtils, to be consistent with the Utils module 2007-12-13 19:05:29 +00:00
Neil Brown
337f189b8a Separated the QuickCheck tests from the HUnit tests and made the number of test-cases configurable for the QuickCheck tests 2007-12-13 18:21:53 +00:00
Douglas Warren
1d83167c01 Fixed some haddock parsing problems in the documentation 2007-11-14 16:26:47 +00:00
Neil Brown
01c7f25f46 Added much more documentation to the FlowGraphTest module 2007-11-12 15:19:12 +00:00
Neil Brown
a248f58201 Turned off generating ASTS with Specs inside Case statements until they have been properly implemented and tested 2007-11-10 23:29:49 +00:00
Neil Brown
185f515cf7 Improved the error message when the graph building fails for QuickCheck 2007-11-10 23:18:21 +00:00
Neil Brown
ff01b24efd Added more items to the AST QuickCheck generator 2007-11-10 21:13:55 +00:00
Neil Brown
19ba2a321c Fixed another misplaced Meta tag problem, this time with Specification 2007-11-10 21:13:16 +00:00
Neil Brown
2c33e1e499 Fixed some meta-tag confusion with the While statement when building a flowgraph 2007-11-10 20:28:12 +00:00
Neil Brown
ac2bee7b48 Added a generator for A.Case to the flow-graph testing 2007-11-10 19:17:01 +00:00
Neil Brown
f050dadaec Added a type specifier to FlowGraphTest to match the changes to the flow-graph builder 2007-11-10 19:16:20 +00:00
Neil Brown
7929715594 Added support for printing printing the results of QuickCheck test failures 2007-11-10 18:23:04 +00:00
Neil Brown
2a7662e46e Added code to build an AST properly for testing (esp. A.Structured) and implemented enough tests to get a failure 2007-11-10 01:31:56 +00:00
Neil Brown
85375c3c6c Changed the flow-graph testing quickcheck functions to use a size parameter when recursively building the trees 2007-11-09 23:48:12 +00:00
Neil Brown
d60d70cf82 Changed the unique identifiers in FlowGraphTest to be their own type, to reduce confusion 2007-11-09 20:05:06 +00:00
Neil Brown
1554d5c7ba Added an initial (slightly clumsy) attempt at using quickcheck to generate ASTs and test the flow-graph-based tree-altering functions 2007-11-09 17:47:10 +00:00
Neil Brown
fbbe539bc0 Changed the types in FlowGraphTest to match the changes to FlowGraph 2007-11-07 13:30:44 +00:00
Neil Brown
4bb2b2a407 Moved mapPair into Utils, and renamed it to transformPair (to be consistent with the pre-existing transformX functions) 2007-11-02 16:44:02 +00:00
Neil Brown
cbc6a70b30 Changed the control-flow graph generation to use the proposed function dictionary, and add the scope-out nodes 2007-10-28 18:26:09 +00:00