The Trunk: TraitsTests-ar.9.mcz

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

The Trunk: TraitsTests-ar.9.mcz

commits-2
Andreas Raab uploaded a new version of TraitsTests to project The Trunk:
http://source.squeak.org/trunk/TraitsTests-ar.9.mcz

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

Name: TraitsTests-ar.9
Author: ar
Time: 5 April 2010, 9:25:28.442 pm
UUID: 67cba713-9140-bb46-a570-adeec9f31511
Ancestors: TraitsTests-ar.8

Mark TraitsResource current dirty after condenseChanges test since it would otherwise wreck havoc with later tests.

=============== Diff against TraitsTests-ar.8 ===============

Item was changed:
  ----- Method: TraitFileOutTest>>testCondenseChanges (in category 'testing') -----
  testCondenseChanges
  "Tests moveChangesTo: in the face of aliases and other trait manipulations"
  | file classOrTrait originals copy |
  file := FileStream forceNewFileNamed: 'TraitFileOutTest.changes'.
  [originals := IdentityDictionary new.
  #(t1 t2 t3 t4 t5 t6 c1 c2) do:[:clsName|
  classOrTrait := self perform: clsName.
  classOrTrait methodsDo:[:each|
  originals at: each put: each getSourceFromFile.
  ].
  file setToEnd.
  classOrTrait moveChangesTo: file.
  originals keysAndValuesDo:[:method :source|
  "we need the upfront assertion to avoid a current bug
  in #nextChunk when using out of bounds indexes"
  self assert: method filePosition < file size.
  copy := file position: method filePosition; nextChunkText.
  self assert: copy = source.
  ].
  ].
  ] ensure:[
+ TraitsResource current setDirty.
  file close.
  FileDirectory default deleteFileNamed: file name ifAbsent:[].
  ].!