public void TestObjectCategoryMessaging ()
{
// Create an object
IntPtr array = objc_sendMsg_IntPtr (this.cls_NSMutableArray, this.sel_alloc);
Assert.AreNotEqual (IntPtr.Zero, array, "NSMutableArray allocation failed");
array = objc_sendMsg_IntPtr (array, this.sel_init);
Assert.AreNotEqual (IntPtr.Zero, array, "NSMutableArray initialization failed");
uint count1, count2;
if (ObjectiveCRuntime.Is64Bits) {
count1 = (uint) objc_sendMsg_ulong (array, sel_registerName ("retainCount"));
count2 = (uint) objc_sendMsg_ulong (array, sel_registerName ("retrieveRetainCount"));
} else {
count1 = objc_sendMsg_uint (array, sel_registerName ("retainCount"));
count2 = objc_sendMsg_uint (array, sel_registerName ("retrieveRetainCount"));
}
Assert.AreEqual (count1, count2, "Retain count must be equals");
// Release the array
objc_sendMsg_void (array, this.sel_release);
}