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

test[s8] isObject



"basic objects "
(self isObject: Point) ifFalse: [ self error: 'Should be false' ].
(self isObject: Object new) ifFalse: [ self error: 'Must be true' ].

"singular objects"
(self isObject: #{undefined}) ifTrue: [ self error: 'Wrong result for undefined' ].
(self isObject: #{null}) ifTrue: [ self error: 'Wrong result for null' ].
(self isObject: nil json) ifTrue: [ self error: 'Wrong result for nil json' ].
(self isObject: (5@3) json) ifTrue: [ self error: 'Wrong result for point json' ].

"normal s8 objects"
(self isObject: nil) ifFalse: [ self error: 'Wrong result for nil' ].
(self isObject: true) ifFalse: [ self error: 'Wrong result for true' ].
(self isObject: false) ifFalse: [ self error: 'Wrong result for false' ].
(self isObject: 12) ifFalse: [ self error: 'Wrong result for 12' ].
(self isObject: 0) ifFalse: [ self error: 'Wrong result for 0' ].
(self isObject: 1) ifFalse: [ self error: 'Wrong result for 1' ].
(self isObject: 1 - 1) ifFalse: [ self error: 'Wrong result for 1-1' ].
(self isObject: #()) ifFalse: [ self error: 'Wrong result for #()' ].
(self isObject: #(7)) ifFalse: [ self error: 'Wrong result for #(7)' ].
(self isObject: #hello) ifFalse: [ self error: 'Wrong result for #hello' ].
(self isObject: '') ifFalse: [ self error: 'Wrong result for empty string' ].