Neil Brown
d0b94e402c
Added (constant divisor, for now) modulo to the QuickCheck tests in ArrayUsageCheckTest
2008-02-09 11:36:37 +00:00
Neil Brown
7fbb83a813
Fiddled with the types of genNewItem and similar functions, ready to support compound expressions in the QuickCheck tests
2008-02-09 02:01:01 +00:00
Neil Brown
cbd4a98ad5
Improved the error message when an array usage check test fails
2008-02-09 01:55:07 +00:00
Neil Brown
842b6b7788
Simplified the QuickCheck test in ArrayUsageCheckTest
2008-02-09 00:57:01 +00:00
Neil Brown
618ac31ae2
Added a QuickCheck test for makeEquations
2008-02-09 00:20:20 +00:00
Neil Brown
2343110311
Refactored some of ArrayUsageCheckTest, simplified it a little and corrected a bug in the test framework
...
Previously, the assertEquivalentProblems function and functions used by it dealt with results inside Maybe, sometimes then inside IO. These functions have been migrated to the new TestMonad. Instead of using Maybe, any problems with the test are dealt with by failing the test instead.
The assertEquivalentProblems function used to take a list of labelled expressions for comparison purposes. Now that we have an ordering on the AST, this is pointless. Instead we can directly sort the lists by the expressions involved. This simplifies the code a little.
Finally, a bug has been fixed. The mapping between expected and actual columns in the swapColumns' function of translateEquations was being used as a backward mapping, even though it was in fact a forward mapping. So that has also been corrected.
2008-02-08 23:58:28 +00:00
Neil Brown
38002bf9a8
Added another array usage check test
2008-02-08 23:56:59 +00:00
Neil Brown
914e9c3d71
Added a new test framework, based on simple monads, to allow easy unification of HUnit and QuickCheck tests with the minimum of work
2008-02-08 16:56:32 +00:00
Neil Brown
f82b6cf6a7
Finished writing the long test for replicated modulo, which seems to pass
2008-02-07 15:35:39 +00:00
Neil Brown
af0160e4fe
Added a test to show up a bug in handling replicator from/for values
2008-02-07 00:23:08 +00:00
Neil Brown
4cb02c4c71
Added lots more checks in ArrayUsageCheckTest that aim to produce a useful message when a usage check is failing
2008-02-06 23:55:25 +00:00
Neil Brown
74d5bc675d
Shorted the definition of generateMapping in ArrayUsageCheckTest
2008-02-06 23:55:01 +00:00
Neil Brown
ba04340989
Changed the ArrayUsageCheckTest framework to give you a test failure (rather than an unhelpful Haskell error) when translateEquations fails to result in a valid array
2008-02-06 23:27:59 +00:00
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
1b7e0985cc
Added labels to a few tests and began writing a new one for replicated variables and modulo
2008-02-04 08:06:32 +00:00
Neil Brown
41194f757f
Added support for background knowledge to makeEquations in ArrayUsageCheck, and fed all the replicator bounds into it
2008-02-03 12:44:51 +00:00
Neil Brown
f26b3309a3
Added a new file of testcases for testing passed parameters
2008-01-29 11:39:04 +00:00
Neil Brown
5ff006f75d
Renamed the UsageCheck module to UsageCheckUtils
2008-01-28 12:59:22 +00:00
Neil Brown
efc69a97cf
Moved all the modules related to usage-checking into a new checks directory
2008-01-28 12:25:00 +00:00