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

test[S8ObjC] ancestors

SwikiCodeRobot @> #testS8ObjCAncestors

"Test ancestors of a class"
| result |
result := (ObjCClass named: #NSMutableArray) ancestors.
result = #(NSMutableArray NSArray NSObject) ifFalse: [
	self error: 'Wrong result'
].


"Test ancestors of an instance of a class"
| result |
result := (ObjCClass named: #NSMutableArray) newInstanceHandle ancestors.
result removeFirst."the first result is internal"
result = #(NSMutableArray NSArray NSObject) ifFalse: [
	self error: 'Wrong result'
].