xamarin-macios/tests/introspection
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
..
Mac [generator] Add missing `EnsureUIThread` for generated `init` and `initWithCoder` (#8250) 2020-03-31 17:20:44 -04:00
iOS [generator] Add C#8 nullability into generated code (#7570) 2020-04-09 09:29:28 -04:00
ApiAvailabilityTest.cs [xcode11.4] Add xcode 11.4 b1 initial support (#7805) 2020-02-11 20:25:43 -05:00
ApiBaseTest.cs [mtouch] Add `force-rejected-types-removal` optimization (#8009) (#8042) 2020-03-04 21:21:41 -05:00
ApiCMAttachmentTest.cs Merge master into d16-5 2019-11-08 10:21:12 -05:00
ApiClassPtrTest.cs [mtouch] Add `force-rejected-types-removal` optimization (#8009) (#8042) 2020-03-04 21:21:41 -05:00
ApiCoreImageFiltersTest.cs Merge master into d16-5 2019-11-08 10:21:12 -05:00
ApiCtorInitTest.cs [mtouch] Add `force-rejected-types-removal` optimization (#8009) (#8042) 2020-03-04 21:21:41 -05:00
ApiFieldTest.cs [xcode11] Remove the WatchKit framework from iOS while keeping API stability. Fixes #6492. (#6503) 2019-08-14 17:46:55 +02:00
ApiFrameworkTest.cs [Localization] mtouch/mmp C# (#7710) 2020-01-31 15:02:52 -05:00
ApiPInvokeTest.cs Merge branch 'master' into mono-2018-10 2019-02-05 21:38:47 +01:00
ApiProtocolTest.cs [Intents] Update bindings from Xcode 10.3 to Xcode 11.4 Beta 2 (#8025) 2020-03-03 06:49:56 -05:00
ApiSelectorTest.cs [MapKit] Update for new API Xcode11 b1 - b7 (#6934) 2019-09-11 09:56:10 -04: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
ApiTypeTest.cs [xcode11.4] [tests] Add `.cctor` execution to introspection (#7987) 2020-02-26 16:16:04 -05:00
ApiTypoTest.cs [Introspection] Fix a false typo in mac modern typo tests. (#8294) 2020-04-06 14:31:46 -04:00
ApiWeakPropertyTest.cs [mtouch] Add `force-rejected-types-removal` optimization (#8009) (#8042) 2020-03-04 21:21:41 -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