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

test[S8Ref] alloc

"should return a new Buffer of #bool size"
| bool  buf |
bool := S8Ref type: #bool.
buf := S8Ref current alloc: (S8Ref type: #bool).
buf length = bool size ifFalse: [
	self error: 'Invalid size'
]


"should coerce string type names"
| bool  buf sz |
bool := S8Ref type: #bool.
buf := S8Ref current alloc: (S8Ref type: #bool).
buf type = bool ifFalse: [
	self error: 'Wrong type - should be  #bool'
].