xamarin-macios/tests/introspection
Sebastien Pouliot 3ef8e41d49
[tests] Add introspection tests to ensure there are native linking instructions for all frameworks. Fixes #3976 (#4194)
* [tests] Add introspection tests to ensure there are native linking instructions for all frameworks. Fixes #3976

or a good, documented (in test code) reason for not needing it.

https://github.com/xamarin/xamarin-macios/issues/3976

* Fix failures

- static registrar failed on 32bits because one type in PhotoUI missed
  its `onlyOn64: true`

- link with the top, not the sub-frameworks

* [tvos] Fix mistakes in tvOS where some extranous types triggered unrequired/unavailable (or missing) frameworks

* [watchos] Fix watchOS frameworks mapping
2018-06-08 10:00:48 -07:00
..
Mac [tests] Add introspection tests to ensure there are native linking instructions for all frameworks. Fixes #3976 (#4194) 2018-06-08 10:00:48 -07:00
iOS [tests] Add introspection tests to ensure there are native linking instructions for all frameworks. Fixes #3976 (#4194) 2018-06-08 10:00:48 -07:00
ApiAvailabilityTest.cs Merge branch 'xcode9.3' 2018-04-03 14:14:07 -04:00
ApiBaseTest.cs Merge xcode9 into d15-4[-xi] (#2710) 2017-09-15 17:53:16 -04:00
ApiCMAttachmentTest.cs [tvos][videotoolbox] Enable VideoToolbox.framework on tvOS (#1626) 2017-03-28 09:22:10 -05:00
ApiClassPtrTest.cs Move parts of dontlink tests into new introspection tests (#32) 2016-05-04 20:14:32 -04:00
ApiCoreImageFiltersTest.cs [CoreImage] Update filters for Xcode 9 (#2974) 2017-11-16 16:38:14 -05:00
ApiCtorInitTest.cs [CoreAudioKit] Fix macOS xtro output (#3508) 2018-02-16 05:49:05 -06:00
ApiFieldTest.cs Merge xcode9 into d15-4[-xi] (#2710) 2017-09-15 17:53:16 -04:00
ApiFrameworkTest.cs [tests] Add introspection tests to ensure there are native linking instructions for all frameworks. Fixes #3976 (#4194) 2018-06-08 10:00:48 -07:00
ApiPInvokeTest.cs [tests][intro] Add validation for methods decorated with [MonoPInvokeCallback] (#1751) 2017-03-04 19:40:35 -05:00
ApiProtocolTest.cs Bump Xcode and versions for 9.3 beta 1 (#3296) 2018-01-25 00:20:11 -05:00
ApiSelectorTest.cs [xtro] Report missing-protocol-conformance when protocols are defined… (#3187) 2018-01-18 13:41:09 -05:00
ApiSignatureTest.cs Merge xcode9 into d15-4[-xi] (#2710) 2017-09-15 17:53:16 -04:00
ApiStructTest.cs Move parts of dontlink tests into new introspection tests (#32) 2016-05-04 20:14:32 -04:00
ApiTypoTest.cs [Compression] Add compression framework bindings. (#3942) 2018-05-11 15:54:31 -04:00
ApiWeakPropertyTest.cs [homekit] Expose weakly-typed API since the constants are extensible. Fixed #60303 (#3025) 2017-11-21 20:50:33 -05:00
CoreSelectorTest.cs [macos] Fix introspection tests (typo + NSUrlSession* test sharing) 2016-09-06 13:32:51 -04:00
EnvironmentVariable.cs Move parts of dontlink tests into new introspection tests (#32) 2016-05-04 20:14:32 -04:00
README.md [tests] Move linker tests from maccore (#69) 2016-05-20 14:07:34 -04:00
xamarin1.png Move parts of dontlink tests into new introspection tests (#32) 2016-05-04 20:14:32 -04:00

README.md

Introspection Tests

Introspection tests are executed on target (both simulator and device for iOS) or a specific version of OSX. The application proceed to analyze itself using:

  • System.Reflection for managed code; and
  • the ObjectiveC runtime library for native code

and compare the results. E.g. if using .NET reflection it can see a binding for a NSBundle type then it should be able to find a native NSBundle type using the ObjC runtime functions. Otherwise an error is raised...

Since the application analyze itself it must contains everything we wish to test. That's why the introspection tests needs to be built with the managed linker disable, i.e. "Don't link".

Pros

  • The tests always tell the truth, which can differ from documentation or header files;

Cons

  • Incomplete - Not everything is encoded in the metadata / executable;
  • Too complete - Not every truth is good to be known (or published), which requires creating special cases in the tests