[squeak-dev] The Trunk: Tests-ar.66.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Mar 30 04:00:51 UTC 2010


Andreas Raab uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ar.66.mcz

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

Name: Tests-ar.66
Author: ar
Time: 29 March 2010, 9:00:35.581 pm
UUID: f10906a2-7e5d-0e41-a82e-031645e0d329
Ancestors: Tests-ul.65

Add two tests for FileStream behavior. One that I thought was broken (but is not) and one that is broken.

=============== Diff against Tests-ul.65 ===============

Item was added:
+ ----- Method: FileStreamTest>>testNextChunkOutOfBounds (in category 'as yet unclassified') -----
+ testNextChunkOutOfBounds
+ 	"Ensure that nextChunkPut:/nextChunk works properly on a caching file"
+ 	| file text read |
+ 	[file := FileStream forceNewFileNamed: 'testNextChunkOutOfBounds'.
+ 	text := 'this is a chunkful of text'.
+ 	file nextChunkPut: text.
+ 	read := [file position: 999999; nextChunkText] valueWithin: 1 seconds onTimeout:[nil].
+ 	self assert: read = ''.
+ 	] ensure:[file close. FileDirectory default deleteFileNamed: file name ifAbsent:[]].!

Item was added:
+ ----- Method: FileStreamTest>>testCachingNextChunkPut (in category 'as yet unclassified') -----
+ testCachingNextChunkPut
+ 	"Ensure that nextChunkPut:/nextChunk works properly on a caching file"
+ 	| file text read |
+ 	[file := FileStream forceNewFileNamed: 'testCachingNextChunkPut'.
+ 	text := 'this is a chunkful of text'.
+ 	file nextChunkPut: text.
+ 	read := [file position: 0; nextChunkText] valueWithin: 1 seconds onTimeout:[''].
+ 	self assert: read = text.
+ 	] ensure:[file close. FileDirectory default deleteFileNamed: file name ifAbsent:[]].!




More information about the Squeak-dev mailing list