fix delete_key in shlwapi/shreg test

James Hawkins truiken at gmail.com
Tue Nov 9 12:00:56 CST 2004


On Tue, 9 Nov 2004 09:52:08 -0800, Bill Medland
<billmedland at mercuryspeed.com> wrote:
> On November 9, 2004 08:54 am, James Hawkins wrote:
> > > Alternatively couldn't we just call SHDeleteKey, now it has been fixed.
> >
> > I guess it's a possibility, but I wanted to keep it like the original
> > code.  Plus it doesn't seem like we should use what we're testing in a
> > test in a non-testing manner.  This version works now, so IMO we
> > should leave it.
> 
> I disagree.  The test should only be there to prove that it all works.  After
> all, there are tests (I hope) that RegDeleteKey actually works. (I wonder if
> they actually handle the differences between 95/98 series and NT series).
> The current structure (using enumeration etc.) is surely only there because
> SHDeleteKey wouldn't do the job at the time and we had to write the more
> complex code (and presumably depended upon some incorrect behaviour to
> achieve the aim.)
> 
> 
> 
> >
> >
> > On Tue, 9 Nov 2004 08:18:47 -0800, Bill Medland
> >
> > <billmedland at mercuryspeed.com> wrote:
> > > On November 9, 2004 12:10 am, James Hawkins wrote:
> > > > oops one-letter typo.  This is the correct version.
> > > >
> > > > On Tue, 9 Nov 2004 01:46:50 -0500, James Hawkins <truiken at gmail.com>
> wrote:
> > > > > the previous implementation of delete_key only deleted subkeys of a
> > > > > requested key to delete.  this fixes that and also fixes test
> > > > > failures that crop up in advapi32/registry because of extraneous keys
> > > > > in Software\Wine\Test.
> > > > >
> > > > > Changelog
> > > > >     * fix implementation of delete_key for shreg test
> > >
> > > Alternatively couldn't we just call SHDeleteKey, now it has been fixed.
> > >
> > > > > --
> > > > > James Hawkins
> 
> -- 
> Bill Medland
> Programmer
> ACCPAC International, Inc.
> bill.medland at BestSoftware.com
> Corporate: www.accpac.com
> Hosted Services: www.accpaconline.com
> 

> I disagree.  The test should only be there to prove that it all works.  After
> all, there are tests (I hope) that RegDeleteKey actually works.

I agree with you that SHDeleteKey does work, but we can't always be
sure that it won't break in the future, and for testing purposes we
assume that RegDeleteKey does work because it is outside of the
current shreg tests.  If for some reason SHDeleteKey breaks in the
future (which things do break), we won't have other tests failing
because SHDeleteKey is broken.  It's a part of the current batch of
shreg tests, so we shouldn't use it for things we want to always work.
 I mean, the part that I changed isn't testing anything, but cleaning
up the changes made by the shreg tests.

-- 
James Hawkins



More information about the wine-devel mailing list