[squeak-dev] The Trunk: CollectionsTests-ul.341.mcz
Levente Uzonyi
leves at caesar.elte.hu
Mon Jul 27 19:18:32 UTC 2020
Hi Eliot,
On Sun, 26 Jul 2020, commits at source.squeak.org wrote:
> Eliot Miranda uploaded a new version of CollectionsTests to project The Trunk:
> http://source.squeak.org/trunk/CollectionsTests-ul.341.mcz
>
> ==================== Summary ====================
>
> Name: CollectionsTests-ul.341
> Author: eem
> Time: 25 July 2020, 8:44:46.338509 pm
> UUID: 1b22fd11-c092-46ba-bd26-526080294ab8
> Ancestors: CollectionsTests-ul.340
>
> Fix an old spelling error.
> Using Levente's initials for the package version and the change stamp because this is his code. I only noticed and fixed the speeling error. No other changes. eem 7/25/2020. I beg forgiveness if this is in any way offensive.
I think it's perfectly fine in this case since we don't have a way to
rename a method (or anything else) and keep the history.
Thanks for fixing it.
Levente
>
> =============== Diff against CollectionsTests-ul.340 ===============
>
> Item was added:
> + ----- Method: ByteArrayTest>>testPlatformIndependentIntegerAccessorsAtBitBorders (in category 'tests - platform independent access') -----
> + testPlatformIndependentIntegerAccessorsAtBitBorders
> +
> + #(
> + shortAt:put:bigEndian: shortAt:bigEndian: false 16
> + longAt:put:bigEndian: longAt:bigEndian: false 32
> + long64At:put:bigEndian: long64At:bigEndian: false 64
> + unsignedShortAt:put:bigEndian: unsignedShortAt:bigEndian: true 16
> + unsignedLongAt:put:bigEndian: unsignedLongAt:bigEndian: true 32
> + unsignedLong64At:put:bigEndian: unsignedLong64At:bigEndian: true 64
> + ) groupsDo: [ :setter :getter :unsigned :storageBits |
> + self
> + verifyPlatformIndependentIntegerAccessorsAtBitBordersSetter: setter
> + getter: getter
> + unsigned: unsigned
> + storageBits: storageBits ]!
>
> Item was added:
> + ----- Method: ByteArrayTest>>testPlatformIndependentIntegerAccessorsWithRandomValues (in category 'tests - platform independent access') -----
> + testPlatformIndependentIntegerAccessorsWithRandomValues
> +
> + | random |
> + random := Random seed: 36rSqueak.
> + #(
> + shortAt:put:bigEndian: shortAt:bigEndian: false 16
> + longAt:put:bigEndian: longAt:bigEndian: false 32
> + long64At:put:bigEndian: long64At:bigEndian: false 64
> + unsignedShortAt:put:bigEndian: unsignedShortAt:bigEndian: true 16
> + unsignedLongAt:put:bigEndian: unsignedLongAt:bigEndian: true 32
> + unsignedLong64At:put:bigEndian: unsignedLong64At:bigEndian: true 64
> + ) groupsDo: [ :setter :getter :unsigned :storageBits |
> + self
> + verifyPlatformIndependentIntegerAccessorsWithRandomValuesSetter: setter
> + getter: getter
> + unsigned: unsigned
> + storageBits: storageBits
> + random: random ]!
>
> Item was removed:
> - ----- Method: ByteArrayTest>>testPlatformIndepentendIntegerAccessorsAtBitBorders (in category 'tests - platform independent access') -----
> - testPlatformIndepentendIntegerAccessorsAtBitBorders
> -
> - #(
> - shortAt:put:bigEndian: shortAt:bigEndian: false 16
> - longAt:put:bigEndian: longAt:bigEndian: false 32
> - long64At:put:bigEndian: long64At:bigEndian: false 64
> - unsignedShortAt:put:bigEndian: unsignedShortAt:bigEndian: true 16
> - unsignedLongAt:put:bigEndian: unsignedLongAt:bigEndian: true 32
> - unsignedLong64At:put:bigEndian: unsignedLong64At:bigEndian: true 64
> - ) groupsDo: [ :setter :getter :unsigned :storageBits |
> - self
> - verifyPlatformIndepentendIntegerAccessorsAtBitBordersSetter: setter
> - getter: getter
> - unsigned: unsigned
> - storageBits: storageBits ]!
>
> Item was removed:
> - ----- Method: ByteArrayTest>>testPlatformIndepentendIntegerAccessorsWithRandomValues (in category 'tests - platform independent access') -----
> - testPlatformIndepentendIntegerAccessorsWithRandomValues
> -
> - | random |
> - random := Random seed: 36rSqueak.
> - #(
> - shortAt:put:bigEndian: shortAt:bigEndian: false 16
> - longAt:put:bigEndian: longAt:bigEndian: false 32
> - long64At:put:bigEndian: long64At:bigEndian: false 64
> - unsignedShortAt:put:bigEndian: unsignedShortAt:bigEndian: true 16
> - unsignedLongAt:put:bigEndian: unsignedLongAt:bigEndian: true 32
> - unsignedLong64At:put:bigEndian: unsignedLong64At:bigEndian: true 64
> - ) groupsDo: [ :setter :getter :unsigned :storageBits |
> - self
> - verifyPlatformIndepentendIntegerAccessorsWithRandomValuesSetter: setter
> - getter: getter
> - unsigned: unsigned
> - storageBits: storageBits
> - random: random ]!
>
> Item was added:
> + ----- Method: ByteArrayTest>>verifyPlatformIndependentIntegerAccessorsAtBitBordersSetter:getter:unsigned:storageBits: (in category 'tests - platform independent access') -----
> + verifyPlatformIndependentIntegerAccessorsAtBitBordersSetter: setter getter: getter unsigned: unsigned storageBits: storageBits
> +
> + | byteArray minValue maxValue baseValues |
> + byteArray := ByteArray new: storageBits // 8 * 2.
> + unsigned
> + ifTrue: [
> + minValue := 0.
> + maxValue := 1 << storageBits - 1.
> + baseValues := #(0 1) ]
> + ifFalse: [
> + minValue := -1 << (storageBits - 1).
> + maxValue := 1 << (storageBits - 1) - 1.
> + baseValues := #(-1 0 1) ].
> + #(true false) do: [ :bigEndian |
> + 0 to: storageBits - 1 do: [ :bits |
> + baseValues do: [ :baseValue |
> + | centerValue |
> + centerValue := baseValue << bits.
> + centerValue - 1 to: centerValue + 1 do: [ :value |
> + (value between: minValue and: maxValue) ifTrue: [
> + self
> + verifyPlatformIndependentIntegerAccessorsMatch: byteArray
> + for: value
> + setter: setter
> + getter: getter
> + storageBits: storageBits
> + bigEndian: bigEndian ] ] ] ] ]
> + !
>
> Item was added:
> + ----- Method: ByteArrayTest>>verifyPlatformIndependentIntegerAccessorsMatch:for:setter:getter:storageBits:bigEndian: (in category 'tests - platform independent access') -----
> + verifyPlatformIndependentIntegerAccessorsMatch: byteArray for: value setter: setter getter: getter storageBits: storageBits bigEndian: bigEndian
> +
> + | expectedSetterResult getterResult bytes |
> + expectedSetterResult := self byteArrayFor: value bits: storageBits bigEndian: bigEndian.
> + bytes := storageBits // 8.
> + 1 to: byteArray size - bytes + 1 do: [ :index |
> + byteArray
> + perform: setter
> + with: index
> + with: value
> + with: bigEndian.
> + 1 to: bytes do: [ :byteIndex |
> + self
> + assert: (expectedSetterResult at: byteIndex)
> + equals: (byteArray at: index + byteIndex - 1) ].
> + getterResult := byteArray
> + perform: getter
> + with: index
> + with: bigEndian.
> + self assert: value equals: getterResult ]!
>
> Item was added:
> + ----- Method: ByteArrayTest>>verifyPlatformIndependentIntegerAccessorsWithRandomValuesSetter:getter:unsigned:storageBits:random: (in category 'tests - platform independent access') -----
> + verifyPlatformIndependentIntegerAccessorsWithRandomValuesSetter: setter getter: getter unsigned: unsigned storageBits: storageBits random: random
> +
> + | byteArray randomMax randomOffset |
> + byteArray := ByteArray new: storageBits // 8 * 2.
> + randomMax := 1 << storageBits.
> + randomOffset := unsigned
> + ifTrue: [ -1 ]
> + ifFalse: [ -1 << (storageBits - 1) - 1 ].
> + 10000 timesRepeat: [
> + | value |
> + value := (random nextInt: randomMax) + randomOffset.
> + #(true false) do: [ :bigEndian |
> + self
> + verifyPlatformIndependentIntegerAccessorsMatch: byteArray
> + for: value
> + setter: setter
> + getter: getter
> + storageBits: storageBits
> + bigEndian: bigEndian ] ]!
>
> Item was removed:
> - ----- Method: ByteArrayTest>>verifyPlatformIndepentendIntegerAccessorsAtBitBordersSetter:getter:unsigned:storageBits: (in category 'tests - platform independent access') -----
> - verifyPlatformIndepentendIntegerAccessorsAtBitBordersSetter: setter getter: getter unsigned: unsigned storageBits: storageBits
> -
> - | byteArray minValue maxValue baseValues |
> - byteArray := ByteArray new: storageBits // 8 * 2.
> - unsigned
> - ifTrue: [
> - minValue := 0.
> - maxValue := 1 << storageBits - 1.
> - baseValues := #(0 1) ]
> - ifFalse: [
> - minValue := -1 << (storageBits - 1).
> - maxValue := 1 << (storageBits - 1) - 1.
> - baseValues := #(-1 0 1) ].
> - #(true false) do: [ :bigEndian |
> - 0 to: storageBits - 1 do: [ :bits |
> - baseValues do: [ :baseValue |
> - | centerValue |
> - centerValue := baseValue << bits.
> - centerValue - 1 to: centerValue + 1 do: [ :value |
> - (value between: minValue and: maxValue) ifTrue: [
> - self
> - verifyPlatformIndepentendIntegerAccessorsMatch: byteArray
> - for: value
> - setter: setter
> - getter: getter
> - storageBits: storageBits
> - bigEndian: bigEndian ] ] ] ] ]
> - !
>
> Item was removed:
> - ----- Method: ByteArrayTest>>verifyPlatformIndepentendIntegerAccessorsMatch:for:setter:getter:storageBits:bigEndian: (in category 'tests - platform independent access') -----
> - verifyPlatformIndepentendIntegerAccessorsMatch: byteArray for: value setter: setter getter: getter storageBits: storageBits bigEndian: bigEndian
> -
> - | expectedSetterResult getterResult bytes |
> - expectedSetterResult := self byteArrayFor: value bits: storageBits bigEndian: bigEndian.
> - bytes := storageBits // 8.
> - 1 to: byteArray size - bytes + 1 do: [ :index |
> - byteArray
> - perform: setter
> - with: index
> - with: value
> - with: bigEndian.
> - 1 to: bytes do: [ :byteIndex |
> - self
> - assert: (expectedSetterResult at: byteIndex)
> - equals: (byteArray at: index + byteIndex - 1) ].
> - getterResult := byteArray
> - perform: getter
> - with: index
> - with: bigEndian.
> - self assert: value equals: getterResult ]!
>
> Item was removed:
> - ----- Method: ByteArrayTest>>verifyPlatformIndepentendIntegerAccessorsWithRandomValuesSetter:getter:unsigned:storageBits:random: (in category 'tests - platform independent access') -----
> - verifyPlatformIndepentendIntegerAccessorsWithRandomValuesSetter: setter getter: getter unsigned: unsigned storageBits: storageBits random: random
> -
> - | byteArray randomMax randomOffset |
> - byteArray := ByteArray new: storageBits // 8 * 2.
> - randomMax := 1 << storageBits.
> - randomOffset := unsigned
> - ifTrue: [ -1 ]
> - ifFalse: [ -1 << (storageBits - 1) - 1 ].
> - 10000 timesRepeat: [
> - | value |
> - value := (random nextInt: randomMax) + randomOffset.
> - #(true false) do: [ :bigEndian |
> - self
> - verifyPlatformIndepentendIntegerAccessorsMatch: byteArray
> - for: value
> - setter: setter
> - getter: getter
> - storageBits: storageBits
> - bigEndian: bigEndian ] ]!
More information about the Squeak-dev
mailing list
|