[ANN] ANSI Messages Unit Tests Updated

R. A. Harmon harmonra at webname.com
Thu Mar 2 22:13:37 UTC 2000

I have updated my implementation of all (eventually) Smalltalk ANSI standard
messages unit tests.

The changes include:

        Updated to Squeak 2.7. 
        Added a rudimentary Program Browser & Program Editor User Manual. 
        Changed to accommodate UNIX installation. 
        Changed to file in and build all ANSI standard type protocol objects. 
        Refactored to global and leaf protocols oriented tests. 
        Added Valuable and Exception Protocols tests, and Numeric Protocols
                through the <number>protocol plus <ScaledDecimal> tests,
                and the Date And Time Protocol tests.
                (They have global test code but missing
                inherited protocol message test code.)
        Added the Collection, Stream, and FileStream Protocols test cases
                with only stub test methods.

It is now available at my web page:

Explanation of my testing Approach:

The first release had a test case for each protocol.  This proved to be too
difficult to insure all ANSI messages were tested. 

This release has a test case for each global defined in the ANSI standard
(Integer, Fraction, etc.).  It also has a test case for each leaf in the
protocol hierarchy tree.  What I call a leaf is a protocol that no other
protocol conforms to (<niladicBlock>, <monadicBlock>, <dyadicValuable>, etc.). 

For each global or leaf test case I programmatically generate from my
standard type protocol objects a stub test method for each message defined
in its corresponding protocol, and for each message defined in protocols to
which it conforms.  I think this ensures that all ANSI messages an object
should respond to are tested. 

I am now adding the code to each stub test method to actually do the testing
by protocol in the order they are defined in the proposed ANSI Smalltalk
Standard document.  I add the testing code first to methods defined in
corresponding protocol (<Integer>), and then the immediate super protocols
(<rational>, <number>, <magnitude>).  I have not yet addressed the most
distant protocols like <Object> except for #= and #hash as I'm unsure of my
approach and they are usually already
implemented in a conforming manner. 

Richard A. Harmon          "The only good zombie is a dead zombie"
harmonra at webname.com           E. G. McCarthy
Spencer, Iowa

More information about the Squeak-dev mailing list