xamarin-macios/tests/monotouch-test/Foundation/ZoneTest.cs

39 строки
787 B
C#
Исходник Обычный вид История

2016-05-26 16:06:52 +03:00
//
// Unit tests for NSZone
//
// Authors:
// Sebastien Pouliot <sebastien@xamarin.com>
//
// Copyright 2013 Xamarin Inc. All rights reserved.
//
using System;
using Foundation;
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
[TestFixture]
[Preserve (AllMembers = true)]
public class ZoneTest {
[Test]
public void Default ()
{
var z = NSZone.Default;
Assert.That (z.Handle, Is.Not.EqualTo (IntPtr.Zero), "Default");
Assert.That (z.Name, Is.EqualTo ("DefaultMallocZone"), "Name");
Bump Xcode version to beta 2 (#349) Fix issues with monotouch-tests with beta2 * TLSMaximumSupportedProtocol returns Unknown, which also means default, instead of SslProtocol.Tls_1_2 * Setting NSZone.Name crash the app * The MDLMesh tests are broken in a different way than beta1 * [callkit] Disable CTCallCenter default ctor as it breaks introspection > [FAIL] Default constructor not allowed for CoreTelephony.CTCallCenter : SIGILL The exception, that we catch, puts the process in an unstable state. This cause weird results and crash later (wrong dispatch queue on main thread) when testing MapKit. Crashed Thread: 0 tid_a07 Dispatch queue: CTCallCenter Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000004 Exception Note: EXC_CORPSE_NOTIFY VM Regions Near 0x4: --> __TEXT 0000000000097000-00000000004d2000 [ 4332K] r-x/rwx SM=COW /Users/USER/Library/Developer/CoreSimulator/Devices/9446B344-62A2-42A8-A8EE-9FE7AC6BA5C8/data/Containers/Bundle/Application/81183608-DADF-4226-B7FE-4B43759D679A/introspection.app/introspection Application Specific Information: BUG IN CLIENT OF LIBDISPATCH: dispatch_barrier_sync called on queue already owned by current thread abort() called CoreSimulator 278 - Device: iPhone 5 - Runtime: iOS 10.0 (14A5297c) - DeviceType: iPhone 5 Some beta2 adjustments (removals) to get green tests and be able to merge it so bindings of beta2 can start * [tests] NEFlowMetaData conformance to NSSecureCoding and NSCopying is new in beta2 (and check fails on OSX 10.11) * [uikit] Add [UIScrollView|UITableViewController].refreshControl to fix monotouch-test build UIRefreshControlHosting was removed in beta2 but we still need the refreshControl property on UIScrollView and UITableViewController to build monotouch-test
2016-07-07 20:10:24 +03:00
// crash on iOS 10 beta 2
if (TestRuntime.CheckXcodeVersion (8,0))
return;
2016-05-26 16:06:52 +03:00
z.Name = "default";
Assert.That (z.Name, Is.EqualTo ("default"), "Name-modified");
// in case the test is executed more than once
z.Name = "DefaultMallocZone";
}
}
}