The Trunk: KernelTests-eem.274.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: KernelTests-eem.274.mcz

commits-2
Eliot Miranda uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-eem.274.mcz

==================== Summary ====================

Name: KernelTests-eem.274
Author: eem
Time: 16 July 2014, 3:46:21.204 pm
UUID: bdd6cda6-6011-4885-b368-877c23cb305e
Ancestors: KernelTests-dtl.273

Fix compact class index tests for Spur.
Fix TimeTest>>testHash for hashing (i.e. Spur).
Add a test of the ranges of SmallInteger>>maxVal/minVal that
will serve to catch forgetting to change thse methods when
Spur 64-bits arrives.

=============== Diff against KernelTests-dtl.273 ===============

Item was added:
+ ----- Method: IntegerTest>>testRange (in category 'tests - basic') -----
+ testRange
+ self assert: SmallInteger maxVal class equals: SmallInteger.
+ self assert: (SmallInteger maxVal + 1) class equals: LargePositiveInteger.
+ self assert: SmallInteger minVal class equals: SmallInteger.
+ self assert: (SmallInteger minVal - 1) class equals: LargeNegativeInteger!

Item was changed:
  ----- Method: LargeNegativeIntegerTest>>testCompactClassIndex (in category 'tests') -----
  testCompactClassIndex
+ Character instSize > 0 ifTrue: "No compact classes on Spur..."
+ [self assert: 4 equals: LargeNegativeInteger indexIfCompact]
- self assert: 4 equals: LargeNegativeInteger indexIfCompact.
  !

Item was changed:
  ----- Method: LargePositiveIntegerTest>>testCompactClassIndex (in category 'tests') -----
  testCompactClassIndex
+ Character instSize > 0 ifTrue: "No compact classes on Spur..."
+ [self assert: 5 equals: LargePositiveInteger indexIfCompact]!
- self assert: 5 equals: LargePositiveInteger indexIfCompact.!

Item was changed:
  ----- Method: TimeTest>>testHash (in category 'testing') -----
  testHash
+ self assert: aTime hash = (Character instSize > 0 ifTrue: [607004] ifFalse: [101409191])!
- self assert: aTime hash =  607004.!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: KernelTests-eem.274.mcz

Frank Shearar-3
On 16 July 2014 23:46,  <[hidden email]> wrote:

> Eliot Miranda uploaded a new version of KernelTests to project The Trunk:
> http://source.squeak.org/trunk/KernelTests-eem.274.mcz
>
> ==================== Summary ====================
>
> Name: KernelTests-eem.274
> Author: eem
> Time: 16 July 2014, 3:46:21.204 pm
> UUID: bdd6cda6-6011-4885-b368-877c23cb305e
> Ancestors: KernelTests-dtl.273
>
> Fix compact class index tests for Spur.
> Fix TimeTest>>testHash for hashing (i.e. Spur).
> Add a test of the ranges of SmallInteger>>maxVal/minVal that
> will serve to catch forgetting to change thse methods when
> Spur 64-bits arrives.
>
> =============== Diff against KernelTests-dtl.273 ===============
>
> Item was added:
> + ----- Method: IntegerTest>>testRange (in category 'tests - basic') -----
> + testRange
> +       self assert: SmallInteger maxVal class equals: SmallInteger.
> +       self assert: (SmallInteger maxVal + 1) class equals: LargePositiveInteger.
> +       self assert: SmallInteger minVal class equals: SmallInteger.
> +       self assert: (SmallInteger minVal - 1) class equals: LargeNegativeInteger!
>
> Item was changed:
>   ----- Method: LargeNegativeIntegerTest>>testCompactClassIndex (in category 'tests') -----
>   testCompactClassIndex
> +       Character instSize > 0 ifTrue: "No compact classes on Spur..."
> +               [self assert: 4 equals: LargeNegativeInteger indexIfCompact]
> -       self assert: 4 equals: LargeNegativeInteger indexIfCompact.
>   !
>
> Item was changed:
>   ----- Method: LargePositiveIntegerTest>>testCompactClassIndex (in category 'tests') -----
>   testCompactClassIndex
> +       Character instSize > 0 ifTrue: "No compact classes on Spur..."
> +               [self assert: 5 equals: LargePositiveInteger indexIfCompact]!
> -       self assert: 5 equals: LargePositiveInteger indexIfCompact.!
>
> Item was changed:
>   ----- Method: TimeTest>>testHash (in category 'testing') -----
>   testHash
> +       self assert: aTime hash = (Character instSize > 0 ifTrue: [607004] ifFalse: [101409191])!
> -       self assert: aTime hash =  607004.!

I wouldn't mind seeing a "No compact classes on Spur..." comment here too.

frank

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: KernelTests-eem.274.mcz

Eliot Miranda-2
Hi Frank,

On Jul 17, 2014, at 7:48 AM, Frank Shearar <[hidden email]> wrote:

> On 16 July 2014 23:46,  <[hidden email]> wrote:
>> Eliot Miranda uploaded a new version of KernelTests to project The Trunk:
>> http://source.squeak.org/trunk/KernelTests-eem.274.mcz
>>
>> ==================== Summary ====================
>>
>> Name: KernelTests-eem.274
>> Author: eem
>> Time: 16 July 2014, 3:46:21.204 pm
>> UUID: bdd6cda6-6011-4885-b368-877c23cb305e
>> Ancestors: KernelTests-dtl.273
>>
>> Fix compact class index tests for Spur.
>> Fix TimeTest>>testHash for hashing (i.e. Spur).
>> Add a test of the ranges of SmallInteger>>maxVal/minVal that
>> will serve to catch forgetting to change thse methods when
>> Spur 64-bits arrives.
>>
>> =============== Diff against KernelTests-dtl.273 ===============
>>
>> Item was added:
>> + ----- Method: IntegerTest>>testRange (in category 'tests - basic') -----
>> + testRange
>> +       self assert: SmallInteger maxVal class equals: SmallInteger.
>> +       self assert: (SmallInteger maxVal + 1) class equals: LargePositiveInteger.
>> +       self assert: SmallInteger minVal class equals: SmallInteger.
>> +       self assert: (SmallInteger minVal - 1) class equals: LargeNegativeInteger!
>>
>> Item was changed:
>>  ----- Method: LargeNegativeIntegerTest>>testCompactClassIndex (in category 'tests') -----
>>  testCompactClassIndex
>> +       Character instSize > 0 ifTrue: "No compact classes on Spur..."
>> +               [self assert: 4 equals: LargeNegativeInteger indexIfCompact]
>> -       self assert: 4 equals: LargeNegativeInteger indexIfCompact.
>>  !
>>
>> Item was changed:
>>  ----- Method: LargePositiveIntegerTest>>testCompactClassIndex (in category 'tests') -----
>>  testCompactClassIndex
>> +       Character instSize > 0 ifTrue: "No compact classes on Spur..."
>> +               [self assert: 5 equals: LargePositiveInteger indexIfCompact]!
>> -       self assert: 5 equals: LargePositiveInteger indexIfCompact.!
>>
>> Item was changed:
>>  ----- Method: TimeTest>>testHash (in category 'testing') -----
>>  testHash
>> +       self assert: aTime hash = (Character instSize > 0 ifTrue: [607004] ifFalse: [101409191])!
>> -       self assert: aTime hash =  607004.!
>
> I wouldn't mind seeing a "No compact classes on Spur..." comment here too.


Ah, but the cause is quite different. The source is the seed to String>>#hash, ByteString class>>#identityHash, which in turn affects the hash of Array species, which is based on Array name (i.e. #Array), which produces a different hash.  Just step through in the debugger and you'll see the source.  So that comment would be misleading; this has nothing to do with compact class indices.

Personally I'd like to see a constant seed to stringHash:initialHash: (if that's the method; I'm on the phone right now).

> frank


Eliot (phone)