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

166 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge fc28b434c2 [monotouch-test] Fix SystemSoundTest.FromFile's audio file to not take 23s. Fixes #54236. (#1942)
In a6b9c28975 I fixed SystemSoundTest.FromFile
to not crash randomly, and at the same time I added an assert to ensure that
the playback completion handler is called properly, with a 10s timeout.

Which won't work, because the audio file is 23s long.

There's no need for a 23s audio file, so the fix is simple: cut the audio file
to 0.3s instead.

https://bugzilla.xamarin.com/show_bug.cgi?id=54236
2017-03-30 14:33:36 +02:00
Sebastien Pouliot 18cee459d6 [tests][monotouch] Stop guessing values for CreateCylinder
It's different on all platforms/SDK versions so it's pointless to use
it inside tests.
2017-03-28 18:15:02 -05:00
Sebastien Pouliot 7f650d08c3 [tests] Disable INIntentResolutionResultTests.cs on XM (it's not ready) 2017-03-28 16:31:49 -05:00
Alex Soto 8ef77344bc [Intents] Updated to Xcode 8.3 Beta1 and Beta2 (#1686)
Added more types to INIntentResolutionResultTests

Partial Test log:

[Runner executing:	Run Everything]
[MonoTouch Version:	10.3.99]
[Assembly:	Xamarin.WatchOS.dll (32 bits)]
[GC:	sgen]
[Apple Watch:	watchOS v3.2]
[Device Name:	iMacAlex]
[Device Locale:	en_US]
[Device Date/Time:	2/13/2017 11:45:10 PM]
[Bundle:	com.xamarin.monotouch-test.watchkitapp.watchkitextension]

 monotouchtest.dll

INIntentResolutionResultTests
	[PASS] INIntentResolutionResultTests.INBillPayeeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INBillTypeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INBooleanResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCallRecordTypeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCarAirCirculationModeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCarAudioSourceResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCarDefrosterResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCarSeatResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCarSignalOptionsResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCurrencyAmountResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INDateComponentsRangeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INDateComponentsResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INDoubleResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INIntegerResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INIntentResolutionResultIsAbstractTest
	[PASS] INIntentResolutionResultTests.INMessageAttributeOptionsResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INMessageAttributeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INPaymentAccountResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INPaymentAmountResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INPaymentStatusResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INPersonResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INPlacemarkResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INRadioTypeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INRelativeReferenceResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INRelativeSettingResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INSpeakableStringResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INStringResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INTemperatureResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INWorkoutGoalUnitTypeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INWorkoutLocationTypeResolutionResultPropertyTest
INIntentResolutionResultTests : 20 ms

* [Intent] Workaround for introspection tests

Right now introspection tests fail randomly on two test targets
iOSApiCtorInitTest and iOSApiSelectorTest so we are temporary
removing them from the test suite with the hope  to have them
fixed on the next beta
2017-03-28 14:40:10 -05:00
Vincent Dondain d819d25bff [modelio] Add missing MDLMesh constructors and fix xtro (#1826)
Fixes bug #52575: Missing ModelIO API
(https://bugzilla.xamarin.com/show_bug.cgi?id=52575)

We turn the MDLMesh constructors into static ones because we don't want to lose the shape name.
Also, the signatures of these constructors differ so it would not be possible to use an enum to differentiate the shapes.
2017-03-28 10:08:12 -05:00
Sebastien Pouliot cb576d53a9 Revert "[tests] Adjust monotouch-test not to crash on an Apple bug. Fixes #52162 (#1699)"
This reverts commit b502bd71a1.
2017-03-28 09:45:24 -05:00
Vincent Dondain 13972a104b [opengles] Add version check to EAGLContext.PresentRenderBufferTest (#1706)
Fix bug #52456: [iOS]EAGLContextTest.PresentRenderBufferTest failed on lower versions of iOS
(https://bugzilla.xamarin.com/show_bug.cgi?id=52456)
2017-03-28 09:42:24 -05:00
Sebastien Pouliot f261d901b1 [tests] Adjust monotouch-test not to crash on an Apple bug. Fixes #52162 (#1699)
iOS 10.3 simulator (i386 only) will crash executing CTLineTests.
EnumerateCaretOffsets test case.

This does not happen on 64 bits (simulator) or on device builds,
including 32 bits builds. Running iOS 10.1 simulator (with Xcode 8.3)
also runs without problems.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=52162
2017-03-28 09:38:18 -05:00
Sebastien Pouliot bcf27ce090 [security] Add more SecCertificate* API from beta1. Fixes #52505 (#1695)
They were thought to be macOS only but xtro corrected me, they are
new in iOS 10.3 even if some existed previously.

references (xtro):
!missing-pinvoke! SecCertificateCopyCommonName is not bound
!missing-pinvoke! SecCertificateCopyEmailAddresses is not bound
!missing-pinvoke! SecCertificateCopyNormalizedIssuerSequence is not bound
!missing-pinvoke! SecCertificateCopyNormalizedSubjectSequence is not bound
!missing-pinvoke! SecCertificateCopyPublicKey is not bound
!missing-pinvoke! SecCertificateCopySerialNumber is not bound

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=52505
2017-03-28 09:34:52 -05:00
Alex Soto 3a1276a992 [VideoToolbox] Updated to Xcode 8.3 Beta 1
* Updated API to reflect Xcode 8.3 beta 1 changes
* This commit also fixes availability metadata to avoid duplicating it
  by moving member availability metadata into its container class where
  possible.
* Enables VideoToolbox tests for tvOS.
2017-03-28 09:29:36 -05:00
Vincent Dondain b15d2e256b [mediaplayer] Update for iOS 10.3 beta 1 (#1627)
* introspection-ios

MPMusicPlayerControllerMutableQueue and MPMusicPlayerControllerQueue's headers show no trace of NSCoding, NSSecureCoding or NSMutableCopying therefore we're skipping them.
2017-03-28 09:24:06 -05:00
Vincent Dondain b7dd01c770 [modelio] Update for iOS 10.3 beta 1 (#1601) 2017-03-28 09:22:27 -05:00
Sebastien Pouliot 2ee5201b84 [tests][monotouch] Generalize some tests to be independent of iOS version. Fixes #51801 (#1598)
The exact values are not what we need to test for and varies with
different OS versions - making tests fails for no good reason (i.e.
they are not canary used to detect changes)

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=51801
2017-03-28 09:16:08 -05:00
Alex Soto 4d9774eeb1 [CoreVideo] Update to iOS 10.3 beta 1 2017-03-28 09:13:31 -05:00
Vincent Dondain f3cd4a50d4 [opengles] Update to iOS 10.3 beta 1 (#1576) 2017-03-28 09:12:08 -05:00
Rolf Bjarne Kvinge 563f395cac Merge remote-tracking branch 'origin/master' into framework-sdk 2017-03-23 15:33:38 +01:00
Rolf Bjarne Kvinge a6b9c28975 [monotouch-test] Fix randomly crashing SystemSoundTest.FromFile to not get a callback after the sound was disposed. Fixes #52903. (#1893)
SystemSoundTest.FromFile was requesting to be called back when the sound
completed playback. This causes problems when the sound is disposed after it
has started playing, because in that case disposing it won't prevent the
callback from being called, but instead random InvalidCastExceptions / crashes
would occur.

https://bugzilla.xamarin.com/show_bug.cgi?id=52903

* SystemSound.PlaySystemSound doesn't work in the simulator.

https://stackoverflow.com/a/24973240/183422
2017-03-22 16:55:55 -05:00
Rolf Bjarne Kvinge 1e498bce22 Merge remote-tracking branch 'origin/master' into framework-sdk 2017-03-07 07:38:30 +01:00
Sebastien Pouliot 984d4e2ab6 [generator] Allow basic support of nullable inside our trampolines. Fixes #42699 (#1820)
We cannot use generics in native signatures but, with some care (and
generator work), we can still expose nullable on our public delegate API.

AUImplementorStringFromValueCallback is presently the only case of such
an API.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=42699
2017-03-03 14:01:33 -05:00
Sebastien Pouliot bedfdd4ec1 [coregraphics] Add CGRect.Null and Infinite properties. Fixes #43628 (#1819)
Apple has both an Empty and Null constants. Our implementation is largely
done in managed code and, for historical reasons [1], match System.Drawing
behaviour. Still the constant is useful for other (e.g. 3rd party) APIs.

Also add CFRect.Infinite for the missing CGRectInfinite symbol.

[1] In the original classic we only provided RectangleF not CGRect

references:
* https://bugzilla.xamarin.com/show_bug.cgi?id=43628
* xtro
	common.unclassified:!missing-field! CGRectNull not bound
	common.unclassified:!missing-field! CGRectInfinite not bound
2017-03-03 09:04:32 -05:00
Sebastien Pouliot 95005feaf7 [coregraphics] Add missing [Flags] on CGGradientDrawingOptions. Fixes #33997 (#1800)
reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=33997
2017-03-01 07:15:32 +01:00
Rolf Bjarne Kvinge 4de9a8c0d6 Merge remote-tracking branch 'origin/master' into framework-sdk 2017-02-28 10:16:18 +01:00
Sebastien Pouliot 55bd2b9f54 [uikit] Add == and != operators on UIEdgeInsets. Fixes #33504 (#1773)
https://bugzilla.xamarin.com/show_bug.cgi?id=33504
2017-02-27 08:50:31 -05:00
Rolf Bjarne Kvinge b28899d89f [tests] Explicitly state the resource name for resources.
This makes it easier for our project-file processing/duplication to get it
right.
2017-02-10 16:39:38 +01:00
Chris Hamons 2c835c5294 [XM] Add hybrid/standard AOT option and improve AOT code (#1650)
* [XM] Seperate parsing from compilation in AOT code

- Parsing command line options was too entangled with actually compiling
- Refactor test code to centralize Compile, reducing some complexity of tests
- Groundwork for hybrid vs non-hybrid AOT work

* Add hybrid/standard AOT support

* Add xammac_tests to makefile/jenkins

* Add flag to force AOT

* Disable MonoTouchFixtures.Contacts.ContactStoreTest.GetUnifiedContacts on XM due to prompts on Jenkins
2017-02-08 13:40:48 -06:00
Rolf Bjarne Kvinge 6fe1c9feab [tests] Use a different bundle id for different apps that can be installed on the same device. (#1509)
* [tests] Use a different bundle id for different apps that can be installed on the same device.

* [xharness] Add workaround for radar #29847128.
2017-01-16 18:34:57 +01:00
Sebastien Pouliot 6e31a77b8e [tests] Generalize CIImage test wrt colorspace. Fixes #51493 (#1496)
So it does not to fail on some iOS versions / devices.

https://bugzilla.xamarin.com/show_bug.cgi?id=51493
2017-01-13 13:05:32 -05:00
Sebastien Pouliot 99de1a772d [uikit] Cover null arrays in new UISegmentedControl.ctor (#1485)
Follow up to PR1477 [1] to cover case [2] for bug #33163 [3]

[1] https://github.com/xamarin/xamarin-macios/pull/1477
[2] https://github.com/xamarin/xamarin-macios/pull/1477#pullrequestreview-16295268
[3] https://bugzilla.xamarin.com/show_bug.cgi?id=33163
2017-01-12 15:33:13 -05:00
Timothy Risi 687aa6f25f Port monotouch-test suite to Xamarin.Mac (#1445)
* Port the Monotouch-test suite to run on Xamarin.Mac

Adds over 1300 new API tests for XM
2017-01-12 09:13:56 -09:00
Sebastien Pouliot aafa135c9c [uikit] Add convenience constructors for UISegmentedControl. Fixes #33163 (#1477)
* Existing `.ctor(object[])` now
    * changed to `params` (not a breaking change);
    * accept `NSString`, along with `string` and `UIImage`;
* Added `.ctor (NSArray)` (exposing the generated code to ease subclassing)
* Added `.ctor (params NSString[])`
* Added `.ctor (params string[])`
* Added `.ctor (params UIImage[])`

Also adds unit tests for all of them.

https://bugzilla.xamarin.com/show_bug.cgi?id=33163
2017-01-11 21:17:51 -05:00
Sebastien Pouliot 1dbffeb3f8 [foundation] Return an empty NSArray that is valid for both managed and native side (#1473)
The existing code was cheating and returned a managed only instance with a `nil` handle. That was fine in many cases but some API (e.g. UISegmentedControl) don't like that (i.e. don't react like a normal, empty NSArray was supplied). It's also the right thing to do since the current behaviour is not guaranteed to remain identical on future updates of the OS.

Unit tests updated.
2017-01-11 19:32:16 -05:00
Sebastien Pouliot 33b7d2e23b [tests] Fix monotouch-test to execute when Link All is used (#1464)
Code inside the category needs to be preserved, since it's not
directly used by C# code.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=51335
2017-01-10 17:28:19 -05:00
Alex Soto 368c9667a7 Merge pull request #1368 from dalexsoto/bug49978
[Tests] GraphicsRendererTest.ImageDefaultFormat test changed default on iPhone 7/7+
2016-12-16 16:38:23 -06:00
Chris Hamons 5ba09748a0 Merge pull request #1344 from xamarin/xcode82-master-hamons
Merge Xcode82 support into master
2016-12-16 13:56:37 -06:00
Alex Soto a4450d697a [Tests] GraphicsRendererTest.ImageDefaultFormat test changed default on iPhone 7/7+
https://bugzilla.xamarin.com/show_bug.cgi?id=49978

Disabled assert of PrefersExtendedRange because it changes its default
value on the iPhone 7/7+ making this test fail
2016-12-16 11:41:19 -06:00
Alex Soto df9c52914d [Tests] Avoid NRE in MediaItemTest.DefaultValues test
https://bugzilla.xamarin.com/show_bug.cgi?id=49978

MPMediaQuery.Item will be null if Media Library privacy access dialog
is not granted
2016-12-15 13:01:26 -06:00
Sebastien Pouliot b5632f9c2f merge xcode8.2 into master 2016-12-12 21:26:23 -05:00
Rolf Bjarne Kvinge 4a90e07b69 [monotouch-test] Add test to ensure config files are properly bundled in apps. (#1291) 2016-12-02 14:13:25 +01:00
Sebastien Pouliot caea761537 [avfoundation] Fix incorrect selector for AVPlayerItemVideoOutput .ctor. Fixes #48382 (#1276)
Commit ba37aa44 workaround around a signature clash incorrectly and
turned the selector to static ones (and incorrectly set the handle)

Also fix a typo in the [Advice] attribute of the old API

https://bugzilla.xamarin.com/show_bug.cgi?id=48382
2016-12-01 17:01:42 -05:00
Alex Soto feac0d2315 [Foundation] Adds single object notifications to Notifications class (#1075)
Trello: https://trello.com/c/mKsUDti8

This adds a new overload to our Notifications class

Current:

public static NSObject ObserveDidStart (EventHandler<NSNotificationEventArgs> handler)

New overload:

public static NSObject ObserveDidStart (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)

This allows our users to have single object subscription to our
easy to find notifications.

Also this commit adds an Advice attribute encouraging to use the
Notifications class instead of the NSString based notifications
2016-11-28 10:19:21 -06:00
Rolf Bjarne Kvinge 10516d3672 [CoreFoundation] Store strings in the exception data when converting CFError to CFException. Fixes #46626. (#1144)
Store strings in the exception data when converting CFError to CFException, to
make sure the data stored is serializable (which is apparently a requirement
with the reference sources).

https://bugzilla.xamarin.com/show_bug.cgi?id=46626
2016-11-09 15:31:02 +01:00
Alex Soto 6b65ce9077 [AVFoundation] Low hanging fruits and xtro of AVFoundation (#980)
This commit brings all new 10.12 api + most of the unbound
AVFoundation API that is macOS specific and was left in the limbo
2016-11-07 09:32:56 -06:00
Rolf Bjarne Kvinge 0c43ddc615 Disable managed exception marshaling when the debugger is attached. Fixes #45116. (#1055)
Managed exception marshaling interferes with the debugger, because it adds
exception handlers to executing code, which makes the Mono runtime think an
exception is handled when logically it's not (although technically it is).

The consequence is that the IDEs will only be notified when we re-throw the
exception after catching it, making it impossible for the IDEs to stop when
the exception is thrown (they will instead stop when we re-throw the
exception).

So disable managed exception marshaling (unless the user changed the default
behavior) when a debugger is attached.

This is the same behavior as Xamarin.Android.

https://bugzilla.xamarin.com/show_bug.cgi?id=45116
2016-10-28 19:07:01 +02:00
Rolf Bjarne Kvinge 4371ea4540 [static registrar] Fix registration of generic types. Fixes #44926. (#1063)
https://bugzilla.xamarin.com/show_bug.cgi?id=44926
2016-10-28 18:42:45 +02:00
Sebastien Pouliot 8c93e7758d Merge branch 'xcode8.1' 2016-10-26 15:56:34 -04:00
Rolf Bjarne Kvinge d395e8df59 [tests] Generate some trampoline and registrar tests.
Generate trampoline and registrar tests that tests if a return type requires objc_msgSend or objc_msgSend_stret.

Now it's much easier to test new return types (a single line of code), which
avoids a _lot_ of copy-pasting, and makes sure all the different variations
are tested properly.

These new tests found several bugs, which are fixed in subsequent commits.
2016-10-13 15:10:43 +02:00
Sebastien Pouliot 24b7b5be2e [passkit] API audit: remove default .ctor on PKLabeledValue, add tests for PKLabeledValue and add xtro comments (#979) 2016-10-12 11:30:11 +02:00
Rolf Bjarne Kvinge 516f764ec4 [tests] Add support for building device tests for 32-bit or 64-bit. 2016-10-11 19:52:36 +02:00
Rolf Bjarne Kvinge f7447a385c [tests] Default to fat apps for device configurations. 2016-10-11 19:52:35 +02:00
Rolf Bjarne Kvinge 5fd5b5ae8c [tests] Remove unused/deprecated variables from project files. 2016-10-11 19:52:35 +02:00