Resolve "Implement Platform's Testing.Options"
Closes #8 (closed).
- I added a usage example to
- Unless people use
Propdirectly or instantiate
Testable, this should not break any existing programs because
- However, in the old setup it was possible to do e.g.
name "x" (name "y" p)which would give the name
x.y. This is not possible any more; this now gives just
x. I'm not sure how important the old feature is. In our current ideas, Gast tests are meant to be non-hierarchical because clean-test is used to combine test suites (with the benefit that tests can be compiled separately and other tests can still run when some test has a run-time error), so I don't think it's necessary. It would be possible to add an
appendName :: n p -> Property | toString n & Testable pto use
appendName "x" (name "y" p)for
x.y, but it would be difficult to put this in the
namefunction which can override an automatically generated name. I currently don't see the use for this
appendName, but it can be added.
- To be able give a name to all properties, I frequently used
thunk_name_to_string. This can give not-so-nice names (when involving lambda expressions, or for simple
Bools as in
newSet_is_empty), but it is always possible to override the auto-generated name with
name :: n p -> Property | toString n & Testable p. In the normal case of a non-constant function or a
Propertythe auto-generated names are nice (see the example, in which
nameis only used once).
--optionit is be possible to set
--option 'Tests 50000'). This uses
gParse. When no
--runis given yet, the options are global.