[squeak-dev] Squeak 4.6: Tests-topa.322.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jun 29 02:09:23 UTC 2015


Chris Muller uploaded a new version of Tests to project Squeak 4.6:
http://source.squeak.org/squeak46/Tests-topa.322.mcz

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

Name: Tests-topa.322
Author: topa
Time: 25 June 2015, 10:48:51.189 am
UUID: 316824e1-862e-45bc-9eac-efb092c6d6ae
Ancestors: Tests-topa.321

More sanity tests

=============== Diff against Tests-ul.319 ===============

Item was added:
+ TestCase subclass: #DataStreamTest
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'Tests-System-Object Storage'!

Item was added:
+ ----- Method: DataStreamTest>>get: (in category 'helper') -----
+ get: aSerialized
+ 
+ 	^ self streamClass unStream: aSerialized!

Item was added:
+ ----- Method: DataStreamTest>>put: (in category 'helper') -----
+ put: anObject
+ 
+ 	^ self streamClass streamedRepresentationOf: anObject.!

Item was added:
+ ----- Method: DataStreamTest>>streamClass (in category 'constants') -----
+ streamClass
+ 	^ DataStream!

Item was added:
+ ----- Method: DataStreamTest>>testCharacter (in category 'tests') -----
+ testCharacter
+ 	| c |
+ 	c := Character value: 16r271D.
+ 	self assert: c equals: (self testObject: c) description: 'Characters should be serializable'!

Item was added:
+ ----- Method: DataStreamTest>>testFloat (in category 'tests') -----
+ testFloat
+ 	| f |
+ 	f := Float pi.
+ 	self assert: f equals: (self testObject: f) description: 'Floats should be serializable'.
+ !

Item was added:
+ ----- Method: DataStreamTest>>testLargeIntergers (in category 'tests') -----
+ testLargeIntergers
+ 	| i |
+ 	i := 123456789012345678901234567890.
+ 	self assert: i equals: (self testObject: i) description: 'A large positive integer should be serializable'.
+ 	
+ 	i := -123456789012345678901234567890.
+ 	self assert: i equals: (self testObject: i) description: 'A large negative integer should be serializable'!

Item was added:
+ ----- Method: DataStreamTest>>testNotTooLargeIntergers (in category 'tests') -----
+ testNotTooLargeIntergers
+ 	| i |
+ 	i := 1234567890123.
+ 	self assert: i equals: (self testObject: i) description: 'A larger, but not too large positive integer should be serializable'.
+ 	
+ 	i := -1234567890123.
+ 	self assert: i equals: (self testObject: i) description: 'A  larger, but not too large negative integer should be serializable'!

Item was added:
+ ----- Method: DataStreamTest>>testObject: (in category 'helper') -----
+ testObject: anObject
+ 	
+ 	| serialized |
+ 	serialized :=  self put: anObject.
+ 	^ self get: serialized!

Item was added:
+ ----- Method: DataStreamTest>>testSmallInteger (in category 'tests') -----
+ testSmallInteger
+ 	| i |
+ 	i := SmallInteger maxVal.
+ 	self assert: i equals: (self testObject: i) description: 'The maximum small integer should be serializable'.
+ 	
+ 	i := SmallInteger minVal.
+ 	self assert: i equals: (self testObject: i) description: 'The minimum small integer should be serializable'!

Item was added:
+ DataStreamTest subclass: #ReferenceStreamTest
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'Tests-System-Object Storage'!

Item was added:
+ ----- Method: ReferenceStreamTest>>streamClass (in category 'constants') -----
+ streamClass
+ 	^ ReferenceStream!

Item was added:
+ ReferenceStreamTest subclass: #SmartRefStreamTest
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'Tests-System-Object Storage'!

Item was added:
+ ----- Method: SmartRefStreamTest>>put: (in category 'helper') -----
+ put: anObject
+ 	
+ 	| s |
+ 	s := RWBinaryOrTextStream on: (ByteArray new: 500).
+ 	 (self streamClass on: s)
+ 		nextPutObjOnly: anObject;
+ 		close.
+ 	^ s contents!

Item was added:
+ ----- Method: SmartRefStreamTest>>streamClass (in category 'constants') -----
+ streamClass
+ 	^ SmartRefStream!



More information about the Squeak-dev mailing list