The Trunk: KernelTests-cmm.304.mcz

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

The Trunk: KernelTests-cmm.304.mcz

commits-2
Chris Muller uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-cmm.304.mcz

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

Name: KernelTests-cmm.304
Author: cmm
Time: 18 February 2016, 5:36:19.810806 pm
UUID: ce91fa74-e629-4983-a472-f11672aa0183
Ancestors: KernelTests-eem.303

Expose nightmare bug just introduced by recent Chronology changes.

=============== Diff against KernelTests-eem.303 ===============

Item was added:
+ ----- Method: TimespanTest>>testRematerializedDateComparison (in category 'testing') -----
+ testRematerializedDateComparison
+ "Tests whether comparison semantics are affected by serialization / rematerialization."
+ | isItTrue date refStream rwstream | date := Date today.
+ isItTrue := DateAndTime now asDate = date.
+ self assert: (date = DateAndTime now asDate) = isItTrue.
+ self assert: (DateAndTime now asDate = date) = isItTrue.
+ rwstream := RWBinaryOrTextStream on: ByteArray new.
+ refStream := ReferenceStream on: rwstream..
+ refStream nextPut: date; close.
+ rwstream position: 0.
+ refStream := ReferenceStream on: rwstream.
+ date := refStream next.
+ refStream close.
+ self assert: (date = DateAndTime now asDate) = isItTrue.
+ self assert: (DateAndTime now asDate = date) = isItTrue.
+ !