The Trunk: CollectionsTests-nice.107.mcz

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

The Trunk: CollectionsTests-nice.107.mcz

commits-2
Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-nice.107.mcz

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

Name: CollectionsTests-nice.107
Author: nice
Time: 3 November 2009, 10:24:26 am
UUID: 065a79ad-d5bf-4ec4-a882-683d2d307f73
Ancestors: CollectionsTests-nice.106

Add a test denying a WeakArray isLiteral

=============== Diff against CollectionsTests-nice.106 ===============

Item was changed:
  ----- Method: ArrayTest>>testIsLiteral (in category 'testing') -----
  testIsLiteral
  "We work with a copy of literalArray, to avoid corrupting the code."
+
+ | aLiteralArray |
+ aLiteralArray := literalArray copy.
+ self assert: aLiteralArray isLiteral.
+ aLiteralArray at: 1 put: self class.
+ self deny: aLiteralArray isLiteral.
+ self deny: (literalArray as: WeakArray) isLiteral description: 'instances of Array subclasses are not literal'.!
- | l |
- l := literalArray copy.
- self assert: l isLiteral.
- l at: 1 put: self class.
- self deny: l isLiteral!