public void Setup() { if (!TestRuntime.CheckXcodeVersion(7, 0)) { Assert.Ignore("Requires iOS 9.0+ or macOS 10.11+"); } if ( #if !MONOMAC Runtime.Arch == Arch.SIMULATOR && #endif IntPtr.Size == 4) { // There's a bug in the i386 version of objc_msgSend where it doesn't preserve SIMD arguments // when resizing the cache of method selectors for a type. So here we call all selectors we can // find, so that the subsequent tests don't end up producing any cache resize (radar #21630410). using (var obj = new MDLObject()) { object dummy; obj.SetComponent(new MDLTransform(), new Protocol("MDLComponent")); obj.IsComponentConforming(new Protocol("MDLComponent")); dummy = obj.Parent; dummy = obj.Transform; obj.AddChild(new MDLObject()); obj.GetBoundingBox(0); } } }
public void ProtocolTest() { using (var obj = new MDLObject()) { var p = new Protocol(typeof(IMDLComponent)); obj.SetComponent(new MDLTransform(), p); Assert.NotNull(obj.IsComponentConforming(p)); } }