[squeak-dev] The Trunk: ToolsTests-nice.69.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jul 27 13:55:18 UTC 2014


Nicolas Cellier uploaded a new version of ToolsTests to project The Trunk:
http://source.squeak.org/trunk/ToolsTests-nice.69.mcz

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

Name: ToolsTests-nice.69
Author: nice
Time: 27 July 2014, 3:55:03.028 pm
UUID: 53091322-737b-4b76-9e47-2e35cefb723b
Ancestors: ToolsTests-cmm.68

Don't use a ReadWriteStream when our intention is just to sequentially write then read.
ReadWriteStream and its complexity should be reserved to random read/write access.
Instead, write on a WriteStream, then read from a ReadStream using new conveniency WriteStream>>readStream..

=============== Diff against ToolsTests-cmm.68 ===============

Item was changed:
  ----- Method: FileContentsBrowserTest>>setUp (in category 'as yet unclassified') -----
  setUp
  	| fileout testCat package packageDict organizer |
  	testCat := self class category.
+ 	fileout := WriteStream on: (String new: 10000).
- 	fileout := ReadWriteStream on: (String new: 10000).
  	SystemOrganization fileOutCategory: testCat on: fileout.
  
  	packageDict := Dictionary new.
  	browser := FileContentsBrowser new.
  	organizer := SystemOrganizer defaultList: Array new.
+ 	package := (FilePackage new fullName: testCat; fileInFrom: fileout readStream).
- 	package := (FilePackage new fullName: testCat; fileInFrom: fileout).
  	packageDict 
  		at: package packageName 
  		put: package.
  	organizer 
  		classifyAll: package classes keys 
  		under: package packageName.
  	(browser := FileContentsBrowser systemOrganizer: organizer)
  		packages: packageDict.!



More information about the Squeak-dev mailing list