コード例 #1
0
        public void Ctor_MKMapView()
        {
            if (!TestRuntime.CheckSDKVersion(7, 0))
            {
                Assert.Ignore("This test crashes with the iOS 6 SDK and an iOS 7 device [iOS bug] (so just force at least an iOS 7 SDK)");
            }

            using (MKMapView mv = new MKMapView())
                using (MKUserTrackingBarButtonItem ut = new MKUserTrackingBarButtonItem(mv)) {
                    Assert.AreSame(mv, ut.MapView, "MapView");
                }
        }
コード例 #2
0
        public void MapView_BackingFields()
        {
            if (!TestRuntime.CheckSDKVersion(7, 0))
            {
                Assert.Ignore("This test crashes with the iOS 6 SDK and an iOS 7 device [iOS bug] (so just force at least an iOS 7 SDK)");
            }

            if (UserTrackingBarButtonItemPoker.NewRefcountEnabled())
            {
                Assert.Inconclusive("backing fields are removed when newrefcount is enabled");
            }

            using (var mv = new MKMapView())
                using (var ut = new UserTrackingBarButtonItemPoker(mv)) {
                    Assert.AreSame(mv, ut.MapViewBackingField, "1a");
                    Assert.AreSame(mv, ut.MapView, "2a");
                }
        }