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

Alain Fischer mailinglist.fischer at bluewin.ch
Sat Mar 20 17:38:12 UTC 2004


Hi Doug,

First of all, I would say that we need this ANSI compatibility in  
Squeak.

I have done some check with ANSI-Tests and ANSICompatibility and here  
are my notes:

====================

System: Mac OS X 10.3.2
VM: Unix 3.6g-2
Image: Squeak3.6-5424

Loaded:
- ANSI-Tests-mini.5.cs (from  
http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/ 
20030319/c2135075/ANSI-Tests-mini.5.bin)
- ANSI-Tests.sar (from SqueaMap with Package Loader)

Test Runner result:
2659 run, 2235 passed, 4 failed, 420 errors

Loaded:
- ANSICompatibility.12.cs.gz (from SqueaMap with Package Loader)

Test Runner result:
2659 run, 2347 passed, 4 failed, 308 errors

Recompiled:
- FloatANSITest
- FractionANSITest
- IntegerANSITest
- ScaledDecimalANSITest

Test Runner result:
2659 run, 2634 passed, 25 failed, 0 errors

====================

System: Mac OS X 10.3.2
VM: Mac 3.7.2b1 (Unix 3.6g-2 is crashing at startup)
Image: Squeak3.7-5816

Loaded (see ANSI-Tests-Preload.cs):
- ScaledDecimal
- String>>subStrings

Removed all TestCase subclasses

Loaded:
- ANSI-Tests.sar (from SqueaMap with Package Loader)

SUnit Test Runner result:
880 run, 570 passed, 7 failed, 303 errors

Fixed SUnit Test Runner
see SUnitTestRunnerFix
!!! this quick fix need more check before including in update stream !!!

SUnit Test Runner result:
2659 run, 2340 passed, 5 failed, 314 errors

Loaded:
- ANSICompatibility.20.cs.gz (on SqueaMap too now)

SUnit Test Runner result:
2659 run, 2346 passed, 5 failed, 308 errors

Recompiled:
- FloatANSITest
- FractionANSITest
- IntegerANSITest
- ScaledDecimalANSITest

SUnit Test Runner result:
2659 run, 2633 passed, 26 failed, 0 errors

Not too bad ?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ANSI-Tests-Preload.1.cs.gz
Type: application/x-gzip
Size: 344 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040320/ccebc627/ANSI-Tests-Preload.1.cs.bin
-------------- next part --------------

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

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



Le 20 mars 04, ? 07:11, Doug Way a ?crit :

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

These values are not right, TestRunner is not testing protocols, see my 
results.

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

The ANSI test suite is checking protocol and not classes.
By exemple, ArrayANSITest must check protocols Array, 
sequencedCollection, collection and Object.
The same tests are rune several time to see if each protocol satify 
each of his parent protocol.

> 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>>
>
>
> <ANSICompatibility.cs.gz>
>
> <RemoveInTestRunner-dew.3.cs.gz>
>
> <ANSITestPreload-dew.1.cs.gz>
>
>


More information about the Squeak-dev mailing list