[ANN] ANSI Messages & Tests Updated (long)

R. A. Harmon harmonra at webname.com
Tue Apr 4 21:39:23 UTC 2000


I have updated my ANSI Messages and their SUnit tests to add, and change
non-conforming, all (eventually) messages required by the ANSI Smalltalk
Standard.

Each file is installed or filed into its own change set so almost all
changes to Squeak can be determined fairly easily.

I appologize for my idiosyncratic code formatting.

ANSI Standard Messages:

        Finished Numeric Protocol messages. 
        Finished Date and Time Protocol messages. 
        Added RuleDate, RuleIndexDate, and RuleSelectionCodeDate support
classes.

The RuleDate and sub-classes instances are suitable for representing dates
such as the start of daylight saving time in the USA (last Sunday in
November); Thanksgiving Day (fourth Tuesday in November) in the USA; and the
last day of daylight saving time (the Saturday before the last Sunday in
October) in the USA.  They have a quick and dirty implementation which
probably could be done better.

There is slightly different behavior of some ANSI methods compared to the
current Squeak versions.  It can cause some subtle errors like that I
corrected in RunArray class>>#scanFrom: where it scanned for the fontNumber
using Number>>#readFrom: when it was looking for an integer (I'm pretty
sure).  The syntax of an ANSI number is different and confused the scan, so
needed to use Integer>>#readFrom:.

I never did find a way to determine the value for DateAndTime
class>>#clockPrecision so I bailed out and returned one second.

I also didn't get ANSI Fraction behavior exactly correct with respect to
reducing the fraction.  I only seems to affect a couple of messages and a
fix I did not include seemed to involve quite subtle interaction which sends
the system into an infinite loop of coercion.  I got tired of futzing with
it and the time I was spending seemed to be disproportionate to the problem.
It can be sorted out later -- sorry.


ANSI Smalltalk Standard Type Protocols:

        Added ClassDescription >> #definedAsProtocolNames to determine
                what instances directly conform and use in testing.


SUnit with Protocol Assertions:

        Finished implementing TestCaseANSI >>
                #value:should:conformTo:selector:opRECEIVER:. 

ANSI Standard Messages Unit Tests:

        Commented out ObjectClassANSITest >> #testXallSuperclasses as I could
                not tell what class must be present in ANSI. 
        Commented out ExceptionANSITest >># testXresignalAsX as it hangs
                SUnit tests by resig. ex., ex. handle by resig. ex.--dumb. 
        Finished all but super protocol Numeric Protocol tests. 
        Finished all but super protocol Date and Time Protocol tests. 

The "all but super protocol ... tests" refer to messages like Object>>#copy.
I have not added these mostly Object message tests.

My tests of the ANSI standard messages are sort of lame but seem to me a
good start, and are were of great use to me in catching errors and the
subtle interaction of the slightly different behavior of some ANSI methods
compared to the current Squeak versions.

My tests of some of the Exception messages are really poor, and a couple
have no test just a commented out start of one.


They are now available at my web page:
 
         http://homepage2.rconnect.com/raharmon/

--
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