The Trunk: Tests-topa.320.mcz

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

The Trunk: Tests-topa.320.mcz

commits-2
Tobias Pape uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-topa.320.mcz

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

Name: Tests-topa.320
Author: topa
Time: 25 June 2015, 10:17:43.498 am
UUID: b92ca80d-36da-49c7-90b5-4cc7e29faa8c
Ancestors: Tests-ul.319

Sanity tests for Data/Ref/Smart Streams

Works on V3 images, not yet on V5/Spur

=============== 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>>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>>expectedFailures (in category 'as yet unclassified') -----
+ expectedFailures
+
+ ^ Character instSize = 0
+ ifTrue: [#( testCharacter )]
+ ifFalse: [#()]!

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!