lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] [PATCH] New input validation test (was: Patches to run the tests w


From: Vadim Zeitlin
Subject: [lmi] [PATCH] New input validation test (was: Patches to run the tests with, or without, any password)
Date: Fri, 13 Mar 2015 01:26:17 +0100

 Hello,

 I'm returning to this old thread, but changing its subject as the main
conclusion was that we need to update the input validation test and my
reply is about this test only.

On Thu, 13 Nov 2014 03:28:13 +0000 Greg Chicares <address@hidden> wrote:

GC> To make sure, I asked Kim. First of all, here's the test she
GC> runs manually, both (1) with no password, (2) with '--mellon'
GC> (but not with the unspeakable password, which has the same
GC> effect as (2) here). Create a new '.ill' document, and choose
GC> a group executive carveout product (one that allows a COI
GC> multiplier less than one). Test only its
GC>   <object class="InputSequenceEntry" name="CurrentCoiMultiplier">
GC> field, in numerous ways (to which I've added one or two),
GC> hitting "OK" after each:
GC>   (a) erase the field
GC>   (b) enter a negative number
GC>   (c) enter zero
GC>   (d) enter a positive number less than the minimum
GC>   (e) enter the minimum
GC>   (f) enter the number one
GC>   (g) enter a number greater than one
GC> and make sure any diagnostics observed are exactly as
GC> prescribed by Input::RealizeCurrentCoiMultiplier().
...
GC> Here's how we'd like to change that test so that it encompasses
GC> everything that is at present done manually. First, open an
GC> '.ill' file that we'll provide to replace "CoiMultiplier.cns".

 The attached patches rely on the presence of CoiMultiplier.ill file in the
GUI tests data directory.

GC> Its parameters will all be defaults, except that we'll choose a
GC> group executive carveout product.

 For testing, I used the default ("sample") product, but I changed the
value of MinInputCoiMult in sample.database to 0.9.

GC> Then we'll force values (a-j)
GC> above into the
GC>   <object class="InputSequenceEntry" name="CurrentCoiMultiplier">
GC> field, simulating "OK" after each one, and test the outcome
GC> against the diagnostics that Input::RealizeCurrentCoiMultiplier()
GC> prescribes.

 This is exactly what the current patches do. Please notice that the first
patch in the series is a pure refactoring, the second one is a trivial new
class addition and the only significant patch is the last one, which
updates the input_validation test code and specification. The code is a bit
long due to the presence of a couple of special cases, but I don't see any
simple way to improve it, so I commented it to at least explain what is
going on here instead.

 If the code complexity bothers you (it does bother me, FWIW), then I'd
like to note that good part of it comes from the need to deal with (and
check for) domain_error exception thrown for the negative COI multiplier
when running with --mellon option. If we could avoid this test (for the
value "-1"), the modifications to SkeletonTest would be unnecessary and the
code of the test itself could be also simplified. Of course, this is not a
good reason to drop/skip this test if it is valuable, but if it is not, it
might be a good idea.


GC> Because this test uses a proprietary produce, we'll want to run
GC> it only with the '--proprietary' flag discussed elsewhere
[This is, of course, known as "--distribution" flag now]

 As always, please let me know if you see any problems with or have any
questions about these patches and thanks in advance for applying them,
VZ

Attachment: 0001-Move-wx_test_new_document_base-into-a-separate-heade.patch
Description: Text document

Attachment: 0002-Add-wx_test_existing_illustration-helper-class.patch
Description: Text document

Attachment: 0003-Update-the-input-validation-test-to-follow-the-new-s.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]