In general, a new method can only fail by a issuing a syntax error, so
these tests would need to be tests where you expect a syntax error.
Pretty much the only failure test I can even think of for this would
be

x = .object~new(1)

which should give a syntax error for two many arguments.  For the
object class, many of these methods end up pretty simple, but they do
start getting interesting when you're dealing with subclasses of
object.  Start, startWith, send, and sendWith are good examples of
these.

Rick

On Sat, Feb 14, 2009 at 8:26 PM, Dan Carter <[email protected]> wrote:
> As Rick suggested I am (trying) writing a test unit for the Object class.
> After studying Mark's Quick Start guide I think I understand what to do.  It
> seems to me that writing test cases involves exercising each method of a
> class which has been instantiated into an object.  Further, it looks to me
> that a method should not be used until it has been tested.  If these ideas
> are inappropriate, please tell me.
>
> My ideas of test composition immediately bit me when I started to conceive
> assertions to test the ~new class method.  Just what is returned if a method
> call fails?  In particular,, in the ooRexx line
>
> tc1 = .Object~new
>
> what will be in tc1 if the call fails?  Will it be the handle of the .NIL
> object?  I am at a loss to figure out how to test the ~new method without
> using other methods of the Object class.
>
> Any suggestions about style, structure, etc.  will be strongly appreciated.
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
>

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to