darcs

Patch 612 Break out Properties3 out of Darcs.Test.... (and 8 more)

Title Break out Properties3 out of Darcs.Test.... (and 8 more)
Superseder Nosy List mornfall
Related Issues
Status accepted Assigned To
Milestone

Created on 2011-06-01.21:41:19 by mornfall, last changed 2011-12-28.00:45:53 by ganesh.

Files
File name Status Uploaded Type Edit Remove
break-out-properties3-out-of-darcs_test_patch_examples_-split-up-test-groups_.dpatch mornfall, 2011-06-01.21:41:18 application/x-darcs-patch
unnamed mornfall, 2011-06-01.21:41:18 text/x-darcs-patch
unnamed mornfall, 2011-06-01.21:41:18
See mailing list archives for discussion on individual patches.
Messages
msg14473 (view) Author: mornfall Date: 2011-06-01.21:41:18
Hi,

I have started on reshaping our patch test code, since I am up to some TDD
(test driven development) this summer and it turned out that the tests are in a
state of sad disarray. The summary of this patchset (please bear in mind that
this is work in progress, but I think it already constitutes an improvement on
previous state of affairs):

I have separated the Darcs.Test.Patch hierarchy into a few orthogonal pieces:

- Arbitrary: QuickCheck generators and assorted utilities
- Examples: manually entered test data
- Properties: property definitions

I have also moved all lists of patch tests into Darcs.Test.Patch, importing all
the above pieces and tying them together in those lists. A quick inspection
shows that there is considerable overlap between the various property sets. For
now, I have retained the original distinctions of
Unit/Unit2/Properties/Properties2 structure, but I fully intend to merge the
two V1 property sets and move anything that is not actually V1-specific out.

Of course, the goal is to make as many properties as generic as possible
(i.e. remove superfluous dependencies on V1 Prim, or V1 Patch whenever
feasible), and then re-use them for testing V3 Prim, and possibly also a
combination of V2 RealPatch with a V3 Prim inside.

Additionally, it seems that at least part of the Example data can be made
Prim-version-neutral, but I haven't checked too hard (alas, at least
Example.Set2 is firmly bound to V1 Prims).

9 patches for repository http://darcs.net:

Wed Jun  1 19:43:31 CEST 2011  Petr Rockai <me@mornfall.net>
  * Break out Properties3 out of Darcs.Test.Patch.Examples, split up test groups.

Wed Jun  1 19:46:16 CEST 2011  Petr Rockai <me@mornfall.net>
  * Make Darcs.Test.Patch.Properties independent of (V1) Prim implementation.

Wed Jun  1 20:07:36 CEST 2011  Petr Rockai <me@mornfall.net>
  * Shuffle the PropertiesN and ExamplesN test modules into a hierarchy.

Wed Jun  1 20:12:00 CEST 2011  Petr Rockai <me@mornfall.net>
  * Add flag to avoid building darcs executable (-f-executable, like -f-library).

Wed Jun  1 20:56:07 CEST 2011  Petr Rockai <me@mornfall.net>
  * Explode Darcs.Test.Patch.Unit into example/property sets + WSub.

Wed Jun  1 22:26:30 CEST 2011  Petr Rockai <me@mornfall.net>
  * Explode Darcs.Test.Patch.Unit2 and Darcs.Test.Patch.QuickCheck.

Wed Jun  1 22:35:04 CEST 2011  Petr Rockai <me@mornfall.net>
  * Merge Darcs.Test.Patch.Prim.V1 into Darcs.Test.Patch.Arbitrary.PrimV1.

Wed Jun  1 22:35:53 CEST 2011  Petr Rockai <me@mornfall.net>
  * Move the test list from Properties.V1Set2 to Darcs.Test.Patch.

Wed Jun  1 23:03:04 CEST 2011  Petr Rockai <me@mornfall.net>
  * Fix a number of warnings, making the tests compile with -fwarn-as-error.
Attachments
msg14477 (view) Author: kowey Date: 2011-06-02.13:02:25
On Wed, Jun 01, 2011 at 21:41:20 +0000, Petr Ročkai wrote:
> I have also moved all lists of patch tests into Darcs.Test.Patch, importing all
> the above pieces and tying them together in those lists. A quick inspection
> shows that there is considerable overlap between the various property sets. For
> now, I have retained the original distinctions of
> Unit/Unit2/Properties/Properties2 structure, but I fully intend to merge the
> two V1 property sets and move anything that is not actually V1-specific out.

Leaving the actual reviewing to Ganesh's hands (he mentioned on IRC
he was planning to review it).

Would it be useful to mention here Iago's comment during the sprint that
it would be nice if the test suite could provide a sort of template for
unit testing each module?  I'm not saying you should do the work to make
this happen or anything, but in case that sort of thing influences any
sort of design decision during the cleanup ...

-- 
Eric Kow <http://erickow.com>
History
Date User Action Args
2011-06-01 21:41:20mornfallcreate
2011-06-02 13:02:26koweysetmessages: + msg14477
2011-06-02 20:40:51ganeshsetstatus: needs-screening -> needs-review
2011-12-27 19:20:16ganeshsetstatus: needs-review -> accepted-pending-tests
2011-12-28 00:45:53ganeshsetstatus: accepted-pending-tests -> accepted