From: Mark Miesfeld <miesfeld@gm...> - 2007-08-10 03:19:45
Picking up from another thread:
> On 8/9/07, Gil Barmwater <gil_b@...> wrote:
>>That sounds like a great starting point, both for contributing in
>>general and in getting familiar with the ooRexxUnit test case framework.
>> Could we get a simple example of 1) an example in the doc. and 2) its
>>corresponding test case?
Here is what I did: I opened up RFE 1771343 You can access it at:
In that RFE I attached a, relatively, simple test unit I created from
some examples in the Rexx Reference. You can download it and take a
look. Anyone can of course.
I put more comment in it than I would normally so that it might be
helpful for someone getting started.
The Rexx Reference I used is one of David's latest ones. If you want
to look up these sections, you will need that version to match the
section numbers. I picked a random spot and looked for a code
example. The first one I found was in section 22.214.171.124. Then I found
two more in 126.96.36.199 and 188.8.131.52.
The example test unit has a test case for each of those 3 code
snippets from the doc and uses 18 assertions.
One thing that struck me as interesting in this little exercise was
that out of the 3 test cases I found one typo in the doc code, and one
of the examples will not work as written. In addition, the 3rd test
case presented me with a real challenge to implement and as usually
happens when programming, it was very satisfying to come up with a
So David's idea can prove very productive in improving the
documentation and also generate some good test cases to regress the
interpreter. And is also kind of fun.
If anyone needs any help or starts to implement a test unit and gets
stuck, just ask and I'll be happy to help.