Patch 2346 tests: replace coverage comments with test

Title tests: replace coverage comments with test
Superseder Nosy List ganesh
Related Issues
Status accepted Assigned To

Created on 2023-08-11.21:31:59 by ganesh, last changed 2023-08-19.14:59:41 by bfrk.

File name Status Uploaded Type Edit Remove
drop-unused-hasdefault-constraint.dpatch ganesh, 2023-08-11.21:31:58 application/x-darcs-patch
harness_-eliminate-class-hasdefault.dpatch bfrk, 2023-08-12.11:34:45 application/x-darcs-patch
patch-preview.txt ganesh, 2023-08-11.21:31:58 text/x-darcs-patch
patch-preview.txt bfrk, 2023-08-12.11:34:45 text/x-darcs-patch
See mailing list archives for discussion on individual patches.
msg23672 (view) Author: ganesh Date: 2023-08-11.21:31:58
This bundle cleans up some old and unhelpful
comments about coverage and replaces them with
an explicit test.

The HasDefault constraint removal is incidental;
it was necessary for the first iteration of this
change but is now just an independent cleanup.

2 patches for repository darcs-unstable@darcs.net:/opt/darcs/screened:

patch eea132e5d35684f19ef4991f6029ee6f61e3be99
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Fri Aug 11 09:36:12 BST 2023
  * drop unused HasDefault constraint

patch 44a482dd63675820ad2cb190c2b3874e58971036
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Fri Aug 11 22:30:05 BST 2023
  * Use property instead of comments about coverage

  It was unclear how to actually do the coverage check
  referred to in the comments.

  The most important part of the comment was about
  commutability which ensures that we get useful
  pairs of patches. This has been replaced with an
  an actual test that uses QuickCheck's coverage
  infrastructure. It also checks that some of the
  commutable pairs change representation when

  The other items were mainly about the actual
  patch contents, which is less likely to be broken
  accidentally, and is also harder to check in a
  generic way.
msg23673 (view) Author: bfrk Date: 2023-08-12.11:34:45
Might as well get rid of class HasDefault. 'fromNothing' is now a synonym for
'fromMaybe False' and I chose to inline it because this is clearer.

1 patch for repository http://darcs.net/screened:

patch 74a6bd5430449e1504628e82a5f4716d630e6fc2
Author: Ben Franksen <ben.franksen@online.de>
Date:   Sat Aug 12 13:28:10 CEST 2023
  * harness: eliminate class HasDefault
msg23674 (view) Author: bfrk Date: 2023-08-12.11:38:55
Review: nice idea to make this a property we can test!
Date User Action Args
2023-08-11 21:31:59ganeshcreate
2023-08-11 21:34:36ganeshsetstatus: needs-screening -> needs-review
title: drop unused HasDefault constraint (and 1 more) -> tests: replace coverage comments with test
2023-08-12 11:34:45bfrksetfiles: + patch-preview.txt, harness_-eliminate-class-hasdefault.dpatch
messages: + msg23673
2023-08-12 11:38:55bfrksetstatus: needs-review -> accepted-pending-tests
messages: + msg23674
2023-08-19 14:59:41bfrksetstatus: accepted-pending-tests -> accepted