[ENH] ANSICompatibility ([er][et])

Doug Way dway at mailcan.com
Sat Mar 20 06:11:16 UTC 2004


On Friday, February 20, 2004, at 02:59 PM, ken at kencausey.com wrote:

> "Change Set:		ANSICompatibility-AFi
> Date:			24 November 2002
> Author:			Alain Fischer
>
> I modified this changeset by removing the DateAndTime and Duration
> changes.  I also removed the changes to TestRunner as I don't think 
> they
> belong here.

I've reviewed Ken's latest version of the ANSICompatibility changeset, 
and I'm inclined to approve it for 3.7alpha... it's been on our to-do 
list for awhile.  I wanted to post my comments here first, though, in 
case there are any concerns.

This is a relatively small set of changes at this point, about 40K.  
The bulk of the original ANSI changes have already been incorporated 
with the previous DateAndTime/Duration additions.

In this changeset, most code is a handful of new classes 
(ScaledDecimal, RuleDate, some arithmetic exception classes), and 
additional methods.  There are actually only 9 changes to existing 
methods, most of these are to make use of the new arithmetic exceptions.

The changes I'd consider non-trivial are:

Number>>raisedToInteger:
Number class>>readRemainderOf:from:base:withSign:
PositionableStream>>skip:

If I remember right, the few most controversial changes needed for 100% 
ANSI compatibility were intentionally left out, so there is still a 
handful of test failures when running the ANSI test suite.  But 99% 
compatibility (at no real cost) beats 90% compatibility.  It'll be nice 
for people porting code to Squeak from other dialects.

A note:  Adding this improved ANSI compatibility does not imply that I 
(or any of the other Guides) want to prevent any future blue-plane or 
other work which might reduce ANSI compatibility in the future.  I 
consider this increased ANSI compatibility to be a nice-to-have 
freebie.  (It's a freebie in the sense that we're not really changing 
much behavior, just adding it.)

Anyway, I ran the ANSI test suite on SqueakMap before and after adding 
the ANSICompatibility changeset.

Without ANSICompatibility changeset:
880 run, 570 passed, 7 failed, 303 errors

With ANSICompatibility changeset:
880 run, 802 passed, 28 failed, 50 errors

Definitely an improvement.  I think the 50 errors are probably 
something that could be relatively easily fixed, but I haven't looked 
into that.

To run the ANSI tests without the compatibility changeset, I had to 
create a tiny ANSITestPreload changeset (attached) to allow just the 
ANSI tests to be installed.  I also created a RemoveInTestRunner cs 
(attached) which lets you delete all tests in the TestRunner as a 
convenience.  So, I did this:

- start with a fresh 3.7alpha-5816 image
- install ANSITestPreload-dew.cs & RemoveInTestRunner-dew.cs
- open SUnit TestRunner and select and delete all tests
- install ANSI Tests package from SqueakMap
- run all tests in the TestRunner

I did a similar set of steps to run the test with the 
ANSICompatibility.cs, loading it instead of the preload cs.

(I noticed that if I included the two TestRunner changes that Ken 
removed from the original ANSI compatibility changeset, the number of 
tests run is 1750 instead of 880, but the failures all seem to be 
duplicates, which means perhaps the tests are mostly duplicates?  (1750 
run, 1643 passed, 57 failed, 50 errors))

That's all for now,

- Doug



Here are the SUnit test results from running the tests with the 
ANSICompatibility cs installed:

Failed:
DateAndTimeANSITest>>#testXhour12
ScaledDecimalANSITest>>#testXasInteger
ScaledDecimalANSITest>>#testXdivideOp
ScaledDecimalANSITest>>#testXequalityOp
FractionANSITest>>#testXprintString
ExceptionANSITest>>#testXouter
MessageNotUnderstoodSelectorANSITest>>#testXhandlesX
FloatANSITest>>#testXtruncateToX
FloatANSITest>>#testXasInteger
FractionANSITest>>#testXraisedToX
IntegerANSITest>>#testXequalityOp
FractionANSITest>>#testXtruncateToX
ExceptionANSITest>>#testXresumeX
ScaledDecimalANSITest>>#testXroundToX
SymbolANSITest>>#testXhash
FractionANSITest>>#testXroundToX
ScaledDecimalANSITest>>#testXraisedToX
ExceptionANSITest>>#testXresume
FractionANSITest>>#testXequalityOp
FractionANSITest>>#testXremainderIntegerDivideOp
ScaledDecimalANSITest>>#testXraisedToIntegerX
IntegerANSITest>>#testXraisedToX
FloatANSITest>>#testXequalityOp
ScaledDecimalANSITest>>#testXsquared
FractionANSITest>>#testXasInteger
ScaledDecimalANSITest>>#testXtruncateToX
ErrorANSITest>>#testXisNested
FloatANSITest>>#testXroundToX

Errors:  (I'm not sure why the selectors are missing here... a bug in 
TestRunner?)
CollectionHelper>>
CollectionHelper>>
CollectionHelper>>
CollectionHelper>>
CollectionHelper>>
CollectionHelper>>
CollectionStreamHelper>>
GettableStreamHelper>>
GettableStreamHelper>>
GettableStreamHelper>>
GettableStreamHelper>>
GettableStreamHelper>>
GettableStreamHelper>>
GettableStreamHelper>>
GettableStreamHelper>>
GettableStreamHelper>>
GettableStreamHelper>>
GettableStreamHelper>>
ObjectHelper>>
ObjectHelper>>
ObjectHelper>>
ObjectHelper>>
ObjectHelper>>
ObjectHelper>>
ObjectHelper>>
ObjectHelper>>
ObjectHelper>>
ObjectHelper>>
ObjectHelper>>
ObjectHelper>>
ObjectHelper>>
ObjectHelper>>
ObjectHelper>>
ObjectHelper>>
ObjectHelper>>
PuttableStreamHelper>>
PuttableStreamHelper>>
PuttableStreamHelper>>
PuttableStreamHelper>>
PuttableStreamHelper>>
PuttableStreamHelper>>
ReadStreamHelper>>
ReadStreamHelper>>
SequencedStreamHelper>>
SequencedStreamHelper>>
SequencedStreamHelper>>
SequencedStreamHelper>>
SequencedStreamHelper>>
SequencedStreamHelper>>
SequencedStreamHelper>>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ANSICompatibility.cs.gz
Type: application/x-gzip
Size: 8443 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040320/910819e4/ANSICompatibility.cs.bin
-------------- next part --------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: RemoveInTestRunner-dew.3.cs.gz
Type: application/x-gzip
Size: 745 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040320/910819e4/RemoveInTestRunner-dew.3.cs.bin
-------------- next part --------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ANSITestPreload-dew.1.cs.gz
Type: application/x-gzip
Size: 481 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040320/910819e4/ANSITestPreload-dew.1.cs.bin
-------------- next part --------------




More information about the Squeak-dev mailing list