[squeak-dev] The Trunk: Tests-dtl.194.mcz
David T. Lewis
lewis at mail.msen.com
Fri Mar 29 14:17:24 UTC 2013
I moved these two new tests from Inbox to Trunk. One test fails on recent
trunk images. I do not know if this is a bug or a feature, but I cannot
explain the regression so I don't want to assume it's a feature.
Dave
On Fri, Mar 29, 2013 at 02:14:02PM +0000, commits at source.squeak.org wrote:
> David T. Lewis uploaded a new version of Tests to project The Trunk:
> http://source.squeak.org/trunk/Tests-dtl.194.mcz
>
> ==================== Summary ====================
>
> Name: Tests-dtl.194
> Author: dtl
> Time: 29 March 2013, 10:13:41.368 am
> UUID: ba96f5b8-f215-4045-a16f-473c8dde8760
> Ancestors: Tests-eem.193
>
> Merge Tests-dtl.193
>
> Background: http://lists.squeakfoundation.org/pipermail/squeak-dev/2013-March/169911.html
>
> Two tests that illustrate the limit to number of literals in a compiled method. Both tests pass on Squeak 4.4. One of the tests fails in the most recent Squeak trunk.
>
> CompilerTest>>testMaxLiteralsWithClassReferenceInClosure passes in the image at
> http://build.squeak.org/job/SqueakTrunk/212/ and fails in later updates to trunk.
>
> =============== Diff against Tests-eem.193 ===============
>
> Item was added:
> + ----- Method: CompilerTest>>testMaxLiterals (in category 'limits') -----
> + testMaxLiterals
> + "Document the maximum number of literals in a compiled method"
> +
> + | maxLiterals stringThatCanBeCompiled stringWithOneTooManyLiterals |
> + maxLiterals := 249.
> + stringThatCanBeCompiled := '{ ', (String streamContents: [:strm |
> + 1 to: maxLiterals do: [:e | strm nextPutAll: '''', e asString, '''', ' . ']]), '}'.
> + stringWithOneTooManyLiterals := '{ ', (String streamContents: [:strm |
> + 1 to: maxLiterals + 1 do: [:e | strm nextPutAll: '''', e asString, '''', ' . ']]), '}'.
> + self shouldnt: [Compiler evaluate: stringThatCanBeCompiled logged: false] raise: Error.
> + self should: (Compiler evaluate: stringThatCanBeCompiled logged: false) size = maxLiterals.
> +
> + "If the following test fails, it means that the limit has been raised or eliminated,
> + and this test should be updated to reflect the improvement."
> + self should: [Compiler evaluate: stringWithOneTooManyLiterals logged: false] raise: Error.
> + !
>
> Item was added:
> + ----- Method: CompilerTest>>testMaxLiteralsWithClassReferenceInClosure (in category 'limits') -----
> + testMaxLiteralsWithClassReferenceInClosure
> + "Document the maximum number of literals in a compiled method. A class
> + reference in a closure reduces the maximum literals."
> +
> + | maxLiterals stringThatCanBeCompiled stringWithOneTooManyLiterals |
> + maxLiterals := 244.
> + stringThatCanBeCompiled := '[ DateAndTime now. Date today. Time ]. { ',
> + (String streamContents: [:strm |
> + 1 to: maxLiterals do: [:e | strm nextPutAll: '''', e asString, '''', ' . ']]), '}'.
> + stringWithOneTooManyLiterals := '[ DateAndTime now. Date today. Time ]. { ',
> + (String streamContents: [:strm |
> + 1 to: maxLiterals + 1 do: [:e | strm nextPutAll: '''', e asString, '''', ' . ']]), '}'.
> + self shouldnt: [Compiler evaluate: stringThatCanBeCompiled logged: false] raise: Error.
> + self should: (Compiler evaluate: stringThatCanBeCompiled logged: false) size = maxLiterals.
> +
> + "If the following test fails, it means that the limit has been raised or eliminated,
> + and this test should be updated to reflect the improvement."
> + self should: [Compiler evaluate: stringWithOneTooManyLiterals logged: false] raise: Error.
> + !
>
More information about the Squeak-dev
mailing list
|