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

14 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 83c1ee189a
[monotouch-test] Adjust ImageCaptioningTest to work on older versions of macOS for Mac Catalyst. (#14265)
Also improve assert messages a bit to not have multiple asserts with the same message.
2022-03-01 08:36:26 +01:00
Rolf Bjarne Kvinge b169c806fc
[dotnet] Remove Runtime.Arch and ObjCRuntime.Arch from Mac Catalyst. Fixes #10312. (#13562)
Remove Runtime.Arch and ObjCRuntime.Arch from Mac Catalyst, because they don't
apply for a Mac Catalyst app (which is neither a simulator environment, nor a
device environment).

This means that code using these APIs will have to be re-evaluated to
determine what's the correct behavior for Mac Catalyst.

Also update our tests accordingly.

Fixes https://github.com/xamarin/xamarin-macios/issues/10312.
2021-12-15 22:32:14 +01: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 82f8ca80a1
[tests] Make ImageCaptioningTest.SetCaption restore the original value at the end. (#11499)
This makes it so that ImageCaptioningTest.GetCaption doesn't fail because it
gets values it doesn't expect.
2021-05-12 07:56:11 +02:00
Sebastien Pouliot edf1847405
[tests] Re-enable MediaAccessibility/ImageCaptioningTest.cs` `SetCaption` test (#10172)
This works fine with Xcode 12.3 beta 1 on 10.15.7 (Intel) and 11.0

ref: https://github.com/xamarin/xamarin-macios/issues/10165
2020-11-30 08:16:36 -05:00
Alex Soto 9d1988a3c8
[tests][xcode12.2] Fix xammac tests (#9935)
* [tests][xcode12.2] Fix xammac tests

* Update tests/common/TestRuntime.cs

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* [xammac] Avoid multiple #if statements

* [xammac] Fix missing cases amd reduce amount of changes

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-10-21 17:12:48 -04:00
Alex Soto 5deee9ea95
[xcode12.2] Initial bump to Xcode 12.2 Beta 2 (#9730)
* [xcode12.2] Initial bump to Xcode 12.2 Beta 2

* Add tvOS specific checks for exact Xcode check
2020-10-02 18:33:38 -04:00
Sebastien Pouliot f427b5e91d
[xcode12] Bump for beta 1 (#8935)
Known issues https://github.com/xamarin/xamarin-macios/issues/8943
2020-06-26 14:02:44 -04:00
Manuel de la Pena cfd8c7a20b
[Tests] Improve error when we have network issues in ImageCaptioningTest.GetCaption (#7591)
The error does give a description letting us know that the url was
invalid, that is, we could not reach it.

Fixes: https://github.com/xamarin/maccore/issues/2088
2019-12-16 22:07:22 -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
Rolf Bjarne Kvinge f496904082
[tests] Fix tests on Catalina. (#7255)
* [monotouch-test] Percent-escape some local file paths. Fixes xamarin/maccore#2032.

Fixes this xammac test failure when the csproj has paths in its path:

    1) GetCaption (MonoTouchFixtures.MediaAccessibility.ImageCaptioningTest.GetCaption)
       System.Exception : Could not initialize an instance of the type 'Foundation.NSUrl': the native 'initWithString:' method returned nil.
    It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false.
      at Foundation.NSObject.InitializeHandle (System.IntPtr handle, System.String initSelector) [0x000ab] in <c93a0a20c5e340cb9a858d96ecca3415>:0
      at Foundation.NSUrl..ctor (System.String urlString) [0x00044] in <c93a0a20c5e340cb9a858d96ecca3415>:0
      at MonoTouchFixtures.MediaAccessibility.ImageCaptioningTest.GetCaption () [0x00076] in <7a733573c3684923854270073138d4be>:0
      at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
      at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <9c0bd541400747ef85267f70e32bd8e4>:0

Fixes https://github.com/xamarin/maccore/issues/2032.

* [tests] Exclude MPS tests in the simulator on macOS 10.15+. Fixes xamarin/maccore#2030.

The simulator crashes when the app tests if MPS is supported...

Fixes https://github.com/xamarin/maccore/issues/2030.

* [tests] Remove 32-bit slice from macOS test libraries. Fixes xamarin/maccore#2031.

The 32-bit slice is causing a build failure on the bots:

    Task "Exec" (TaskId:35)
      Task Parameter:Command=make bin/SimpleClassDylib.dylib bin/SimpleClassStatic.a bin/Mobile-static/MobileBinding.dll (TaskId:35)
      Task Parameter:WorkingDirectory=/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/mmptest//../mac-binding-project/ (TaskId:35)
      make bin/SimpleClassDylib.dylib bin/SimpleClassStatic.a bin/Mobile-static/MobileBinding.dll (TaskId:35)
      In file included from ../common/mac/SimpleClass.m:1: (TaskId:35)
      In file included from ../common/mac/SimpleClass.h:1: (TaskId:35)
      In file included from /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13: (TaskId:35)
      In file included from /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:27: (TaskId:35)
      In file included from /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCollectionView.h:9: (TaskId:35)
    /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSViewController.h(247,39): error GF2D19E48: unknown type name 'NSExtensionContext'; did you mean 'NSAnimationContext'? [/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/tmp-test-dir/mmptest/mmptest.csproj]
      @property (nullable, readonly,retain) NSExtensionContext *extensionContext API_AVAILABLE(macos(10.10)); (TaskId:35)
                                            ^ (TaskId:35)
      /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:18:12: note: 'NSAnimationContext' declared here (TaskId:35)
      @interface NSAnimationContext : NSObject (TaskId:35)
                 ^ (TaskId:35)
      In file included from ../common/mac/SimpleClass.m:1: (TaskId:35)
      In file included from ../common/mac/SimpleClass.h:1: (TaskId:35)
      In file included from /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13: (TaskId:35)
      In file included from /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:99: (TaskId:35)
      In file included from /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingServicePickerTouchBarItem.h:9: (TaskId:35)
    /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h(181,119): error GC04982C4: expected a type [/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/tmp-test-dir/mmptest/mmptest.csproj]
      - (NSCloudKitSharingServiceOptions)optionsForSharingService:(NSSharingService *)cloudKitSharingService shareProvider:(NSItemProvider *)provider; (TaskId:35)
                                                                                                                            ^ (TaskId:35)
    /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h(196,12): error G93352991: cannot find interface declaration for 'NSItemProvider' [/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/tmp-test-dir/mmptest/mmptest.csproj]
      @interface NSItemProvider (NSCloudKitSharing) (TaskId:35)
                 ^ (TaskId:35)
      In file included from ../common/mac/SimpleClass.m:1: (TaskId:35)
      In file included from ../common/mac/SimpleClass.h:1: (TaskId:35)
      In file included from /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13: (TaskId:35)
      In file included from /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:250: (TaskId:35)
    /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSItemProvider.h(16,12): error G93352991: cannot find interface declaration for 'NSItemProvider' [/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/tmp-test-dir/mmptest/mmptest.csproj]
      @interface NSItemProvider (NSItemSourceInfo) (TaskId:35)
                 ^ (TaskId:35)
      4 errors generated. (TaskId:35)
      make[1]: *** [bin/SimpleClass.i386.a] Error 1 (TaskId:35)

and since we don't need the 32-bit slice anymore, just remove it.

Fixes https://github.com/xamarin/maccore/issues/2031.
2019-10-19 00:01:53 +02:00
Rolf Bjarne Kvinge 650768c059
[monotouch-test] Apple has fixed a crash in the ImageCaptioningTest, so update the test accordingly. (#6905)
* [monotouch-test] Apple has fixed a crash in the ImageCaptioningTest, so update the test accordingly.

Apple has fixed a crash we ran into with the ImageCaptioningTest, so now we
can re-enable the code that caused the crash.

* Fix test in the simulator.

* Fix test build failure for Xamarin.Mac.
2019-09-05 03:01:37 -07:00
Rolf Bjarne Kvinge 612a74a0fd [monotouch-test] Don't try to set image captions on read-only files.
iOS will helpfully crash.
2019-07-11 19:04:14 +02:00
Sebastien Pouliot e28a0810aa
[mediaaccessibility] Update for Xcode 11 beta 1 (#6457)
No change in beta 2

Unit tests added - but new API behaviour is not quite what I expected.
Maybe future docs will make this clearer...
2019-06-28 13:31:53 -04:00