The Trunk: Kernel-nice.299.mcz

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

The Trunk: Kernel-nice.299.mcz

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

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

Name: Kernel-nice.299
Author: nice
Time: 14 November 2009, 10:20:34 am
UUID: 2c6f60a5-26ac-44e1-8227-c6ec1ce99b7b
Ancestors: Kernel-nice.298

move DependentsArrayTest from Kernel to KernelTests

=============== Diff against Kernel-nice.298 ===============

Item was changed:
  SystemOrganization addCategory: #'Kernel-Chronology'!
  SystemOrganization addCategory: #'Kernel-Classes'!
  SystemOrganization addCategory: #'Kernel-Methods'!
  SystemOrganization addCategory: #'Kernel-Numbers'!
  SystemOrganization addCategory: #'Kernel-Objects'!
  SystemOrganization addCategory: #'Kernel-Processes'!
  SystemOrganization addCategory: #'Kernel-Models'!
  SystemOrganization addCategory: #'Kernel-Tests-ClassBuilder'!
- SystemOrganization addCategory: #'Kernel-Objects-Tests'!

Item was removed:
- ClassTestCase subclass: #DependentsArrayTest
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Kernel-Objects-Tests'!
-
- !DependentsArrayTest commentStamp: '<historical>' prior: 0!
- This class is to test the special implementation of DependentsArray.
-
- DependentsArray size will not count nil elements (the ones reclaimed by garbage collector).
- Consequently, any message implemented with a construction like (1 to: self size do: [:i | ]) and sent to the dependents of any object might not behave as supposed to.!

Item was removed:
- ----- Method: DependentsArrayTest>>testAddingTwice (in category 'testing') -----
- testAddingTwice
-
- | test dep2 deps |
- test := Object new.
- dep2 := String with: $z with: $u with: $t.
-
- test addDependent: String new.
- test addDependent: dep2.
-
- Smalltalk garbageCollect. "this will make first dependent vanish, replaced by nil"
-
- test addDependent: dep2.
-
- deps := test dependents.
- self should: [deps asIdentitySet size = deps size] description: 'No object should be added twice in dependents'!

Item was removed:
- ----- Method: DependentsArrayTest>>testCanDiscardEdits (in category 'testing') -----
- testCanDiscardEdits
- "self debug: #testCanDiscardEdits."
-
- | anObject aView  |
- anObject := Object new.
- aView := StringHolderView new
- model: Transcript;
- window: (0@0 extent: 60@60);
- borderWidth: 1.
- aView hasUnacceptedEdits: true.
- anObject addDependent: Object new. "this entry should be garbage collected"
- anObject addDependent: aView.
-
- Smalltalk garbageCollect. "force garbage collection"
-
- self
- should: [anObject dependents size = 1]
- description: 'first dependent of anObject should have been collected, second should not'.
-
- self
- shouldnt: [anObject canDiscardEdits]
- description: 'anObject cannot discard edits because aView is a dependent of anObject and aView has unaccepted edits'.!