Граф коммитов

58 Коммитов

Автор SHA1 Сообщение Дата
Sebastien Pouliot 0d95c4a5b9
[net][objcruntime] Add `GetHashCode` and `Equals` to `DisposableObject` (#13746)
* Ensure all `DisposableObject` subclasses have an implementation based
  on their `Handle` property and not relying on `System.Object` default.
  E.g. `CFArray`, `CFString`...

* Reduce code duplication for the few subclasses that have overrides
  doing just the same, e.g. `Class`, `Selector`

Types subclassing `NativeObject` that had `Equals` and `GetHashCode` overridden

* CoreFoundation.CFRunLoop
* CoreFoundation.DispatchObject (and DispatchQueue subclass)
* CoreGraphics.CGColor -> special case with it's own [native equality function](https://developer.apple.com/documentation/coregraphics/1455217-cgcolorequaltocolor) [1]
* CoreGraphics.CGPath -> special case with it's own [native equality function](https://developer.apple.com/documentation/coregraphics/1411167-cgpathequaltopath) [1]
* Security.SecPolicy

[1] this is a **BUG** since `Equals` can return `true` while `GetHashCode` returns different values !?!?!

> Two objects that are equal return hash codes that are equal.
https://docs.microsoft.com/en-us/dotnet/api/system.object.gethashcode?view=net-6.0

I'm not sure how to get a good _fast_ hash code...

> However, the reverse is not true: equal hash codes do not imply object equality, because different (unequal) objects can have identical hash codes.

but returning a constant if fast and valid - even if it looks funky.

Subclasses that did not have `Equals` and `GetHashCode` implemented

* VideoToolbox.VTFrameSilo
* VideoToolbox.VTMultiPassStorage
* VideoToolbox.VTSession
* SystemConfiguration.NetworkReachability
* Security.SecCertificate
* Security.SecIdentity
* Security.SecKey
* Security.SecAccessControl
* Security.SecCertificate2
* Security.SecIdentity2
* Security.SecProtocolMetadata
* Security.SecProtocolOptions
* Security.SecTrust
* Security.SecTrust2
* Security.SslContext
* Network.NWAdvertiseDescriptor
* Network.NWBrowseResult
* Network.NWBrowser
* Network.NWBrowserDescriptor
* Network.NWConnection
* Network.NWConnectionGroup
* Network.NWContentContext
* Network.NWDataTransferReport
* Network.NWEndpoint
* Network.NWError
* Network.NWEstablishmentReport
* Network.NWFramer
* Network.NWInterface
* Network.NWListener
* Network.NWMulticastGroup
* Network.NWParameters
* Network.NWPath
* Network.NWPathMonitor
* Network.NWPrivacyContext
* Network.NWProtocolDefinition
* Network.NWProtocolMetadata
* Network.NWProtocolOptions
* Network.NWProtocolStack
* Network.NWResolutionReport
* Network.NWResolverConfig
* Network.NWTxtRecord
* Network.NWWebSocketRequest
* Network.NWWebSocketResponse
* MediaToolbox.MTAudioProcessingTap
* ImageIO.CGImageDestination
* ImageIO.CGImageMetadata
* ImageIO.CGImageMetadataTag
* ImageIO.CGImageSource
* CoreVideo.CVBuffer
* CoreVideo.CVMetalTexture
* CoreVideo.CVMetalTextureCache
* CoreVideo.CVPixelBufferPool
* CoreText.CTFont
* CoreText.CTFontCollection
* CoreText.CTFontDescriptor
* CoreText.CTFrame
* CoreText.CTFramesetter
* CoreText.CTGlyphInfo
* CoreText.CTLine
* CoreText.CTParagraphStyle
* CoreText.CTRun
* CoreText.CTRunDelegate
* CoreText.CTTextTab
* CoreText.CTTypesetter
* CoreMedia.CMBlockBuffer
* CoreMedia.CMBufferQueue
* CoreMedia.CMFormatDescription
* CoreMedia.CMMemoryPool
* CoreMedia.CMSampleBuffer
* CoreMedia.CMClockOrTimebase
* CoreGraphics.CGColorConversionInfo
* CoreGraphics.CGColorConverter
* CoreGraphics.CGColorSpace
* CoreGraphics.CGContext
* CoreGraphics.CGDataConsumer
* CoreGraphics.CGDataProvider
* CoreGraphics.CGFont
* CoreGraphics.CGFunction
* CoreGraphics.CGGradient
* CoreGraphics.CGImage
* CoreGraphics.CGLayer
* CoreGraphics.CGPDFContentStream
* CoreGraphics.CGPDFDocument
* CoreGraphics.CGPDFOperatorTable
* CoreGraphics.CGPDFPage
* CoreGraphics.CGPDFScanner
* CoreGraphics.CGPattern
* CoreGraphics.CGShading
* CoreFoundation.CFBundle
* CoreFoundation.CFAllocator
* CoreFoundation.CFArray
* CoreFoundation.CFBoolean
* CoreFoundation.CFData
* CoreFoundation.CFDictionary
* CoreFoundation.CFMachPort
* CoreFoundation.CFMessagePort
* CoreFoundation.CFNotificationCenter
* CoreFoundation.CFPropertyList
* CoreFoundation.CFRunLoopSource
* CoreFoundation.CFString
* CoreFoundation.CFType
* CoreFoundation.CFUrl
* CoreFoundation.DispatchBlock
* CoreFoundation.OSLog
* CoreServices.CFHost
* AddressBook.ABAddressBook
* AddressBook.ABMultiValue<T>
* AddressBook.ABRecord
* ObjCRuntime.BaseWrapper
2022-01-19 08:22:24 +01:00
Rolf Bjarne Kvinge fa2173e5ef
[CFNetwork] Move the CFHost and CFHTTP* types to the CFNetwork namespace in .NET. (#13761)
These types come from the CFNetwork.framework, but for some reason they were bound inside CoreServices many years ago.

This resolves a potential issue where we might end up linking with the
CoreServices framework instead of CFNetwork framework (because we use the
namespace of types to determine which framework they belong to).
2022-01-19 08:07:06 +01:00
Rolf Bjarne Kvinge 0bd6cf095c
[tests] Remove a few Assert.Inconclusive calls that won't be executed anymore. (#13557)
Don't conditionally ignore tests that fail on Snow Leopard (or earlier),
because we're always executing on a later OS now.
2021-12-14 17:06:09 +01:00
Rolf Bjarne Kvinge 2bb5fc88c5
[src] Adjust visibility of numerous (IntPtr) and (IntPtr, bool) constructors (#13444)
* There should be no public (IntPtr) constructor, at most there should be a
  protected one for NSObject subclasses. There should be no such constructors
  for classes that just implement INativeObject.
* There should be no public (IntPtr, bool) constructor at all, they should all
  be internal.
* If changing the visibility or removing the ctor is a breaking change, then
  make it happen for .NET only.
2021-11-26 14:24:05 +01:00
Rolf Bjarne Kvinge 66e596e9d9
[tests] Change TestRuntime.CheckSystemVersion to take a ApplePlatform value instead of a PlatformName enum. (#13350)
The PlatformName enum will be removed from .NET soon.
2021-11-15 08:06:36 +01:00
Manuel de la Pena 86ac68fc31
[Tests] Remove not needed usings in the CoreData and CoreFoundation tests. (#13254) 2021-11-03 16:48:48 -04:00
Rolf Bjarne Kvinge a862d505de
[CFBundle] Subclass NativeObject + numerous other code updates (#13041)
* Subclass NativeObject to reuse object lifetime code.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use CFString.CreateNative/ReleaseNative instead of other means to create native
  strings (the fastest and least memory hungry option).
* Use 'nameof (parameter)' instead of string constants.
* Call 'GetCheckedHandle ()' (which will throw an ObjectDisposedException if
  Handle  == IntPtr.Zero) instead of manually checking for IntPtr.Zero and throwing
  ObjectDisposedException.
* Use CFArray helper methods to create arrays (and implement some helper methods
  that didn't exist).
* Add a few tests for the new CFArray helper methods.
2021-10-21 18:04:08 +02:00
Manuel de la Pena 339936f457
[Tests] Fix cecil tests. (#12853)
-  Added the marshaling attr and a test to ensure it is ok.
- Fix the cecil MarshalAs test to not skip over types when checking.
    This revealed multiple tests failures that needed fixing.

fixes: https://github.com/xamarin/maccore/issues/2519

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-09-28 08:09:23 -04:00
Rolf Bjarne Kvinge e707c7cda8
[tests] Remove assert that fails on M1 on Rosetta. (#12641)
Fixes this error when running on M1 (and Rosetta):

    MonoTouchFixtures.CoreFoundation.BundleTest.TestGetBundleIdNull : 0.9134 ms
        [FAIL] TestIsArchitectureLoadable :   arm64 Expected => false
            Expected: False
            But was:  True
                at MonoTouchFixtures.CoreFoundation.BundleTest.TestIsArchitectureLoadable() in xamarin-macios/tests/monotouch-test/CoreFoundation/BundleTest.cs:line 375
2021-09-07 18:52:53 +02:00
Rolf Bjarne Kvinge 2972e1b715
Fix some whitespace issues in various files. (#12399)
* Remove BOM
* Add EOL at end of file.
2021-08-11 10:06:46 +02:00
Rolf Bjarne Kvinge 6c3bf9a4c8 [tests] Add a comment about Rosetta. 2021-05-12 07:34:11 +02:00
Rolf Bjarne Kvinge ccbdb33b93 [monotouch-test] Adjust BundleTest.TestIsArchitectureLoadable for ARM64.
We can still load an X64 executable when running on an ARM64 CPU.
2021-05-11 15:54:39 +02:00
Rolf Bjarne Kvinge 538fd86172
[tests] Add a .NET/macOS version of monotouch-test. (#10672)
* [tests] Add a .NET/macOS version of monotouch-test.

I made a macOS version of monotouch-test instead of a .NET version of xammac tests,
so that one day we might have only one test suite for all our API tests.

* Add a project file for .NET/macOS
* Fix some code to handle the fact that we're called 'monotouchtest' on macOS (but
  only on .NET).
* Ignore exception marshalling tests, those aren't working yet.

* [xharness] Add support for .NET/macOS and add a macOS version of monotouch-test to our tests

* [dotnet-linker] Skip libSystem.Net.Security.Native and libSystem.Native when collecting native methods to preserve for .NET/macOS.
2021-02-24 16:07:04 +01:00
Rolf Bjarne Kvinge aa1bf71cd6 [monotouch-test] Make it work with Mac Catalyst.
* Fix system version checks to work properly on Mac Catalyst (which uses the macOS
  version as its system version).

* Add the framework-specific defines to the build for monotouch-test.csproj (using
  the generated response files), this way we can use them in the tests.

* Sprinkle conditionals in numerous places - I tried using either framework-specific
  or XAMCORE_3_0 whenever that made since (instead of using Mac Catalyst as a condition).

* Updated a few tests to use non-deprecated API (because the deprecated API often
  doesn't exist in Mac Catalyst).

* Also a few minor API fixes to make any corresponding tests compile.
2021-01-15 17:52:28 +01:00
Rolf Bjarne Kvinge ef53600f7a
[monotouch-test] Change the url for the TestPACParsingScriptNoProxy test to be the Microsoft uri. (#10423)
All the other *NoProxy tests use the Microsoft uri, which seems to be the uri
that's not supposed to need a proxy (according to what I understand from the
code) - in other words, it looks like this was a c&p error.

Fixes this test failure when running on device:

    [FAIL] TestPACParsingAsyncNoProxy :   Expected: None
        But was:  HTTPS
	        at MonoTouchFixtures.CoreFoundation.ProxyTest.TestPACParsingAsyncNoProxy () [0x000fa] in /Users/rolf/work/maccore/onedotnet/xamarin-macios/tests/monotouch-test/CoreFoundation/ProxyTest.cs:238
2021-01-15 08:25:19 +01:00
Rolf Bjarne Kvinge 93bbfe7a86
[tests] Merge apitest into xammac_tests. (#10276)
* [apitest] Sanitize files by adding missing eols.

* [apitest] Add #if __MACOS__ to all test files.

In preparation for the move into monotouchtest.

* [apitest] Move test files into monotouchtest.

* [tests] Remove the apitest project.

* [monotouch-test] Remove MessagingMac.cs, it's not needed.

* [xammac-tests] Add file PlatformInfo.cs to the build.

* [xammac-tests] Move files into monotouch-test.

* [monotouch-test] Rename test class to not clash with another test class of the same (Objective-C) name.

* [tests] How did this ever work?

Answer: it never did.

* [monotouch-test] Remove duplicated test code.

* [xammac-tests] Define DYNAMIC_REGISTRAR when we're using the dynamic registrar.

* [monotouch-test] Adjust the BundleTest.TestGetBundleId test to cope with having multiple apps for the same bundle id.

* [monotouch-test] Ignore a test that doesn't work with the static registrar (due to a bug in the static registrar).
2020-12-18 11:45:06 +01:00
Manuel de la Pena 0f7bc75e50 Merge branch 'xcode12.2' into main-xcode12.2 2020-11-17 11:09:15 -05:00
Sebastien Pouliot c5a43ac2b7
[oslog] New framework in macOS 11 (#9820)
Fix https://github.com/xamarin/xamarin-macios/issues/9480
2020-10-08 16:33:03 -04:00
Alex Soto d3d278e367
[CoreFoundation] Update bindings up to Xcode 12.2 Beta 2 (#9720)
* [CoreFoundation] Update bindings to Xcode 12.2

* Fix NRE

* Add tests for manual API

* Oops, fix spacing
2020-10-08 06:38:38 -04:00
Rolf Bjarne Kvinge 0a5b72d64b [tests] Update attributes in tests according to breaking changes in NUnit[Lite]. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge f516fcfb07 [tests] Use the Does.[BeginWith|Contain|EndWith] constraints instead of the Is.[StringStarting|StringContaining|StringEnding] constraints.
The latter don't exist in the official NUnitLite anymore.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 4e8219b42e
[tests] The HttpWebRequest constructors are not publicly available in .NET 5, so use WebRequest.CreateHttp instead. (#9157) 2020-07-23 08:37:45 +02:00
Rolf Bjarne Kvinge 2995cd086a
[tests] Update tests to make native type vs normal type comparison explicit (#9097)
We've modified our NUnitLite to special-case the native types, so that they
can easily be compared with the standard types, but that doesn't work anymore
when switching to the official NUnit[Lite], so change all asserts to
explicitly convert whenever needed.
2020-07-17 08:48:09 +02:00
Rolf Bjarne Kvinge e344698612
[tests] Use Assert.Throws instead of the ExpectedException attribute. (#9092)
* [tests] Use Assert.Throws instead of the ExpectedException attribute.

The ExpectedExceptionAttribute doesn't exist in newer versions of NUnit[Lite] anymore.

* [monotouch-test] Rework some CaptiveNetwork tests.

They need permissions, and entitlements, and something else I couldn't figure
out, so just assert they're returning null instead.
2020-07-16 08:19:33 +02:00
Rolf Bjarne Kvinge 952037b7a3
[tests] Remove Classic code from all tests. (#8707) 2020-05-29 16:43:06 +02:00
Rolf Bjarne Kvinge 2b2f1d08dc
[tests] Remove Classic code from all tests. (#8702) 2020-05-28 16:35:09 +02:00
Sebastien Pouliot e819d09658
[corefoundation] Safer NativeObject (#8667)
Do not allow calling `CFRetain` or `CFRelease` on a null handle as this
will crash the process, instead use `GetCheckedHandle` so a managed (and
catchable) `ObjectDisposedException` can be thrown.

Make `GetCheckedHandle` public so subclasses (outside the platform
assembly) can use it - it's already recommended in some `[Obsolete]`
attributes (but was not made available).

Move the `ObjectDisposedException` thrower into a new `ThrowHelper`
class. This will allow sharing it (to be re-used in future PR).

Add unit tests for `NativeObject`.
2020-05-26 12:09:26 -04:00
Sebastien Pouliot 15938de198
[generator] Add C#8 nullability into generated code (#7570) (#8333)
Goals
* Reflect Apple nullability annotations in our bindings using C#8
* No warnings when building bindings

Non-Goals
* Update (add or fix) `[NullAllowed]` to match Apple headers (next phase)
* Make the generator or internal code fully nullable aware (`nowarn` is used)

Notes
* Apple's own annotations are not 100% accurate :(
* Where known issue exists we have _fixed_ our attributes to match reality :)
* We also do additional null-checks internally that might seems not required (better safe than sorry).
2020-04-10 12:38:14 -04:00
Sebastien Pouliot a5ac0ea102
[generator] Add C#8 nullability into generated code (#7570)
Goals
* Reflect Apple nullability annotations in our bindings using C#8
* No warnings when building bindings

Non-Goals
* Update (add or fix) `[NullAllowed]` to match Apple headers (next phase)
* Make the generator or internal code fully nullable aware (`nowarn` is used)

Notes
* Apple's own annotations are not 100% accurate :(
* Where known issue exists we have _fixed_ our attributes to match reality :)
* We also do additional null-checks internally that might seems not required (better safe than sorry).
2020-04-09 09:29:28 -04:00
Sebastien Pouliot 9a8855117b
[corefoundation] Fix TypeInitializationException in OSLog (#7962)
`Default` property was using a nil-handle which is incorrect since
* we don't allow that (this is generally a bad sign)
* it does not map to `OS_LOG_DEFAULT`

Since `Default` was assigned in the type (static) constructor then
the whole type became unusable :(

Header `log.h` shows that the right definition requires us to load a
field and use it.

```
define OS_LOG_DEFAULT OS_OBJECT_GLOBAL_OBJECT(os_log_t, _os_log_default)
```

While `NULL` can actually be used for disabled (not exposed) by this
contradicting (nullability-wise) macro

```
define OS_LOG_DISABLED ((os_log_t _Nonnull)NULL)
```

Also adds unit tests. A more general tests for `.cctor` will be added
to introspection tests in a separate PR.

Fixes https://github.com/xamarin/xamarin-macios/issues/7959
2020-02-25 08:55:37 -05:00
Manuel de la Pena 8dd672801c
[CoreFoundation] Add some helper methods to make DispatchData easier to use. (#7690)
Add the following methods:

1. FromReadOnlySpan - Allows to create DispatchData from Spans.
2. ToArray - Return a managed copy of the data.

Fixes: https://github.com/xamarin/xamarin-macios/issues/7446
2020-01-09 22:47:21 -05:00
Manuel de la Pena d83e9687a6
[Tests] Centralized the endpoints for the different network tests. (#7418)
Use a single point where the different enpoints can be found so that
if they need to be updated (server issues or other) it is a simple
change that will affect all tests in monotouch-tests
2019-11-14 05:45:33 -05:00
Manuel de la Pena 8a63932245
[Tests] GetGlobalQueue_QualityOfService is only supported on Mac OS X 10.10 and later (#7419)
Ensure that the test does not fail in earlier versions of the os.

Fixes: https://github.com/xamarin/maccore/issues/2062
2019-11-13 06:03:23 -05:00
michizhou e9b18d4c2f [CoreFoundation] [tests] Add new DispatchQueue overloaded method (#7343)
* [CoreFoundation] [tests] Add new DispatchQueue overloaded method with unit tests. Fixes #6783

* [CoreFoundation] [tests] Add new variant method to DispatchQueue

* [CoreFoundation] [tests] Remove nonexistent DispatchQueue methods

* [CoreFoundation] [tests] Restore existing methods and tests
2019-11-12 14:56:45 +01:00
Rolf Bjarne Kvinge 5b7ea53e2e [monotouch-test] Fix ProxyTest according to changed behavior in iOS 13.
In iOS 13 it's no longer possible to get PACs from file:// urls (this is
explained in the release notes, so it's expected). So launch a local
httpserver and serve the PAC that way.
2019-09-16 15:21:29 +02:00
Manuel de la Pena 626799bdae
[Tests] Ignore some tests on the CI due to the settings of the bots. (#6671)
In some cases some bots will return a proxy present, not because of the
PAC being parsed, but due to the bot settings. Ignore the tests that
expect no proxies in the CI fixes the issue.

Fixes https://github.com/xamarin/maccore/issues/1901
2019-07-29 13:55:30 +02:00
Manuel de la Pena e8eec97d20
[CFNetwork] Expose methods that were ignored until the dependencies were present. (#6201)
Expose methods to allow users query PAC files to get proxy settings.
2019-07-26 21:21:03 +02:00
Rolf Bjarne Kvinge 45d93dafd0
[monotouch-test] Adjust expected value for watchOS bundle id. (#6128)
The watchOS bundle ID changed in fc5067ee67, and
the test failure wasn't caught properly.
2019-05-24 06:30:05 -07:00
Marius Ungureanu 14bd63afa0 [CoreFoundation] Add tests for CFUrl retain count (#6101) 2019-05-23 22:36:54 -07:00
Sebastien Pouliot e53b94d27c
[corefoundation] Add missing CFStringTransform API. Fixes #5705 (#5712)
Since there's no `NSString` or .NET equivalent. This requires a mutable
`CFString` so the new type `CFMutableString` is also added.

* Switch `CFString` base type to `NativeObject` to ease `CFMutableString` implementation;
* Add unit tests for `CFMutableString` both for `CFStringTransform` and some unicode variety to `CFStringAppendCharacters tests` wrt `numChars` being unicode or not (bytes)

Fixes https://github.com/xamarin/xamarin-macios/issues/5705
2019-03-06 08:04:17 -05:00
Rolf Bjarne Kvinge ab12d72419
[tests] Adjust DispatchBlock tests according to minimum OS. (#5435)
* [tests] Adjust DispatchBlock tests according to minimum OS.

* [tests] Fix monotouch-test build.
2019-01-21 07:49:28 +01:00
Miguel de Icaza c9e424c9ab [CoreFoundation, ObjCRuntime] Add DispatchBlock APIs, in particular those that surface QOS (#5389)
* [CoreFoundation, ObjCRuntime] Add DispatchBlock APIs, in particular those that surface QOS

* Make the struct readonly

Co-Authored-By: migueldeicaza <miguel@gnome.org>

* Make the field read-only

Co-Authored-By: migueldeicaza <miguel@gnome.org>

* Add Qos to the list of accepted words

* To add a finalizer that can dispose the object, turn this into a class,
rather than being just a wrapper around the native handle.

* Fix copyright.

* Fix whitespace issues.

* Adjust visibility of existing DispatchBlock method we don't want to make public

* Refactor a bit.

* Make DispatchObject inherit from NativeObject to avoid some code duplication.
* Put all P/Invokes in BlockLiteral.
* Simplify block code somewhat.
* Sprinkle [BindingImpl (Optimizable)] where needed.
* Add both constructors and static Create methods to create DispatchBlocks.
* Add an explicit operator to get an Action delegate from a DispatchBlock, and
  an Invoke method to directly call said delegate.
* Add a few convenience API:
	* Wait with a TimeSpan overload.
	* Cancelled property.
	* Notify with an Action overload.

* Add some DispatchQueue overloads to make DispatchBlock actually usable.

* Seal DispatchBlock.

Users shouldn't subclass DispatchBlock.

* Add tests.

* DispatchBlockFlags is native-sized (nuint).

* Fix a few more nint issues.

* Add availability attributes.

* Fix introspection tests.

* Fix xtro.

* Fix xammac tests.
2019-01-17 18:40:58 +01:00
Sebastien Pouliot 0304219723
[tests] Fix some tests to succeed when run on macOS 10.14 (#5057)
Public bots were updated today.

Fixes https://github.com/xamarin/maccore/issues/1106
Fixes https://github.com/xamarin/maccore/issues/1107
2018-10-31 08:32:36 -04:00
Rolf Bjarne Kvinge ee1f7dc33d
[CoreFoundation] Implement missing dispatch API. Fixes #4606. (#4967)
* [CoreFoundation] Add DispatchQueue.DispatchBarrierSync.

* [CoreFoundation] Bind dispatch_queue_[set|get]_specific.

* [CoreFoundation] Bind dispatch_queue_get_qos_class.

* [CoreFoundation] Bind dispatch_queue_create_with_target.

* Add tests.

* Update xtro.

* Add missing availability attributes.

* [tests] Do a version check before testing new API.

* Remove redundant code.
2018-10-17 14:42:29 +02:00
Vincent Dondain eec95e881c Merge branch 'd15-8' into xcode10-rebase-15.8 2018-08-13 21:04:56 -04:00
Miguel de Icaza 49bb4aa0ca Xcode10 CoreGraphics B1-B5 (#4198)
* [CoreGraphics] Add first batch of Xcode10 APIs, added an enum that we did not surface before

* [xcode10] CoreGraphics support

* Fix whitespace/formatting and add comma after last enum value.

* Make CFPropertyList follow normal INativeObject creation pattern.

* Make CFPropertyList.AsData return the error as a tuple.

* Fix CFPropertyList.AsData to not leak.

* CFPropertyList.Value: use Runtime.GetNSObject so that we don't accidentally create duplicate wrappers for the same native object.

* [CoreGraphics] Update to beta 5.

* Update xtro definitions.

* Add tests.

* Don't compare value type with null.

* Use PascalCase for named return tuples.

* [CoreFoundation] Make CFPropertyList enums native and fix code accordingly.

* [tests] Fix fetching 64-bit int to actually fetch a 64-bit int and not a nint.

* [tests] Teach introspection's ApiCMAttachmentTest about CFPropertyList.
2018-08-01 16:25:40 +02:00
Rolf Bjarne Kvinge 1b12348e57 [tests] Refactor API to check/assert current OS version. 2018-07-04 12:35:15 +02:00
Rolf Bjarne Kvinge fe8e2cc439 [monotouch-test] Cope with potential symlinks when comparing bundle paths. 2018-07-03 20:47:14 +02:00
Rolf Bjarne Kvinge 9703f17c91 [monotouch-test] Fix versions checks.
* Fix many version checks to be based on Xcode version instead of iOS version.
* Added/fixed a few expected values according to platform version to match behavior in older macOS versions.
2018-07-03 20:47:14 +02:00
Rolf Bjarne Kvinge f7ce5b91c5 [monotouch-test] Make BundleTest.TestPreferredLocalizations laxer. (#4005)
Change test to verify that all preferred localizations are in the list of
available localizations (instead of hardcoding an expected result of 'en').

This makes the TestPreferredLocalizations work if the device language is 'es',
in which case the preferred language between 'en' and 'es' is obviously 'es'.
2018-04-27 12:00:17 -04:00