David, this is great news. You like my approach. :-)
The separation in 3 files is intentional. I was thinking about of reusing TestCollection for future
tastcases on other methods of AbstractCollection. But I'm not enough familiar with jtreg to argue,
if this is possible.
Similarly class Infrastructure could be reused over all JDK's tests. But personnally I would prefer
to more and more use the JUnit framework. Is there already an existing example?
How do you ensure, that all existing jdk subclasses of AbstractCollection are tested by the same
patterns?
I like your javadoc for setSizeSequence, but I have an addition, see below.
Have a nice flight,
-Ulf
Am 29.03.2012 02:36, schrieb David Holmes:
Hi Ulf,
Thanks for the updates. This will take a little rearranging to get into the right form I think - a
single file is easier to deal with so we could nest the TestCollection class.
Regarding setPseudoConcurrentChronologicalSizeSequence, I think perhaps:
/** Sets the values that size() will return on each use. The next
call to size will return sizes[0], then sizes[1] etc. This
allows us to emulate a concurrent change to the contents of
the collection without having to perform concurrent changes.
If sizes contains a larger valuethan on last invocation, the collection
will appear to
have shrunk when iterated; if a smaller value then the
collection will appear to have grown when iterated
*/
void setSizeSequence(int... sizes) {
this.sizes = sizes;
nextSize = 0;
}
Sean: can you massage this into a final version? If not I will try to do so but I'm about to head
out to JavaOne Japan and then am taking some vacation time. Might be something I can work on on
the plane :)
Thanks,
David
On 29/03/2012 4:48 AM, Ulf Zibis wrote:
Hi David, Sean,
I have made little changes to make understanding little easier, see
attachment...
-Ulf
Am 28.03.2012 07:29, schrieb David Holmes:
Hi Ulf,
I understand your point about ensuring we test
AbstractCollection.toArray but I find this revised test much harder to
understand.
Also in the name setPseudoConcurrentSizeCourse the word "Course"
doesn't fit. I'm not sure what you were meaning here? Perhaps just
modifySize or emulateConcurrentSizeChange ?
Thanks,
David