xamarin-macios/tests/common
Rolf Bjarne Kvinge a88a79cfc0
[mtouch/mmp] Handle invalid types in BlockProxy attributes better. Fixes #4072. (#4073)
* [mtouch/mmp] Handle invalid types in BlockProxy attributes better. Fixes #4072.

BlockProxy attributes may have types we don't expect, so handle those cases
gracefully by showing a warning when we encounter them:

    testApp.cs(11): warning MT4175: The parameter 'completionHandler' in the method 'Issue4072Session.CreateDataTask(Foundation.NSUrl,Foundation.NSUrlSessionResponse)' has an invalid BlockProxy attribute (the type passed to the attribute does not have a 'Create' method).

instead of an ugly MT0000:

    MTOUCH : error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
    System.InvalidOperationException: Sequence contains no matching element
      at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00012] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq/src/System/Linq/First.cs:30
      at Registrar.StaticRegistrar.GetBlockProxyAttributeMethod (Mono.Cecil.MethodDefinition method, System.Int32 parameter) [0x00020] in /Users/builder/data/lanes/5944/7e782c1e/source/xamarin-macios/tools/common/StaticRegistrar.cs:4121
      at Registrar.StaticRegistrar.GetBlockWrapperCreator (Registrar.Registrar+ObjCMethod obj_method, System.Int32 parameter) [0x00011] in /Users/builder/data/lanes/5944/7e782c1e/source/xamarin-macios/tools/common/StaticRegistrar.cs:4065
      at Registrar.StaticRegistrar.Specialize (Registrar.AutoIndentStringBuilder sb, Registrar.Registrar+ObjCMethod method, System.Collections.Generic.List`1[T] exceptions) [0x0216b] in /Users/builder/data/lanes/5944/7e782c1e/source/xamarin-macios/tools/common/StaticRegistrar.cs:3683
      at Registrar.StaticRegistrar.Specialize (Registrar.AutoIndentStringBuilder sb) [0x00f1e] in /Users/builder/data/lanes/5944/7e782c1e/source/xamarin-macios/tools/common/StaticRegistrar.cs:2963

Fixes #4072.

* [docs] Improve text for MT4175.

* [registrar] Comment some code.
2018-05-11 14:42:27 +02:00
..
mac [runtime] integrate mono 2018-02 (#3402) 2018-04-25 13:56:37 -04:00
ApiTest.cs [tests] Augment the AlwaysOptimizable test to ensure methods that call Runtime.DynamicRegistrationSupported are also optimizable. 2018-02-15 10:23:26 +01:00
Assert.cs [tests] Import 2016-05-26 15:06:52 +02:00
AssertHelpers.cs [tests] Specify ordinal string comparison for a few string operations. (#1406) 2016-12-23 17:07:18 +01:00
BundlerTest.cs [mtouch/mmp] Handle invalid types in BlockProxy attributes better. Fixes #4072. (#4073) 2018-05-11 14:42:27 +02:00
BundlerTool.cs [tests] Add a test to make sure the protocol attributes are properly removed. 2018-02-13 19:38:34 +01:00
ConditionalCompilation.cs [msbuild] Don't define __IOS__ for tvOS binding projects (#2274) 2017-06-30 12:35:48 -04:00
Configuration.cs [mmp][mtouch] Better guard framework SDK checks (#3757) 2018-03-20 09:26:25 -05:00
ExecutionHelper.cs [tests] Produce a better test failure message when verifying the number of warnings. (#3465) 2018-02-13 15:01:34 +01:00
MachO.cs [mmp] Add stripping of 32-bit dylibs to work with new App Store restrictions (#3387) 2018-03-01 09:36:06 -06:00
MixedClassLibrary.dll [macos] Error when linking mix-mode assemblies (#2911) 2017-11-16 09:18:18 -06:00
PlatformInfo.cs [tests] Create 'link all' and 'link sdk' tests for XM. (#3234) 2018-01-16 19:15:59 +01:00
ProductTests.cs [Tests] Ensure that we do use the correct encoding. Fixes #582 (#3049) 2017-11-28 16:43:27 +01:00
Profile.cs [tests] Share supporting code between the mtouch and mmp tests. (#3374) 2018-02-02 07:09:04 +01:00
TestRuntime.cs [tests] Determine at runtime instead of compile time whether LinkAll is enabled. Fixes #3812. (#4004) 2018-04-27 13:11:27 +02:00