[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test[S8ObjC] cast-date

SwikiCodeRobot @> #testS8ObjCCastDate

"test Date -> NSData casting works"
| date nsdate |
ObjCClass named: #NSDate in: #Foundation.
date := DateTime now.
nsdate := S8ObjC current handle value: date.
(nsdate value: #timeIntervalSince1970) * 1000 = date getTime
	ifFalse: [ self error: 'Wrong value' ].