Hi,
Tania Bento wrote:
Hey,
This patch fixes a couple of bugs in the setValues, setBlockIncrement
and setUnitIncrement methods. This patch fixes a few bugs exposed by
Intel's test suite and others that I came across while fixing the
others.
I have committed mauve tests that support these changes. Could someone
kindly approve or comment this patch.
In the setValues method, the following changes were made:
1. If the value of visibleAmount is 0, then visibleAmount should be set
to 1 and not 0.
OK.
2. If the value of maximum is <= minimum, then maximum should be set to
minimum + 1.
OK.
3. According to the API, the actual value of maximum is maximum -
visibleAmount. So, instead of checking if value < maximum, we have to
check if value < maximum - visibleAmount.
OK.
4. I removed the two bigger if-clauses that deals with the range because
(a) it will never happen that the range = 0 because we know that maximum
will never equal minimum) and (b) it doesn't matter if lineIncrement is
the range - it won't effect the value of lineIncrement. The same
applies for pageIncrement.
Are you saying that if, in setValues, lineIncrement > range, then the reference
implementation doesn't clamp it to range? Does Intel test for this explicitly?
Likewise for the unit and block increments? That seems strange, but if it's
the case, then this patch is OK.
Tom