xamarin-macios/tests/introspection
Sebastien Pouliot 00a69e1654
[dotnet] Update `Min*` constants and fix builds for tests (#10835)
We're bumping the minimum OS versions for all supported platforms
https://github.com/dotnet/core/blob/master/release-notes/6.0/6.0-supported-os.md

Intro's `Introduced` test is ignored as it require (a lot of) changes. This
will be fixed in separate PRs and gradually re-enabled.

iOS
```
[FAIL] Introduced : 7573 API with unneeded or incorrect version information
```

tvOS
```
[FAIL] Introduced : 299 API with unneeded or incorrect version information
```

Tracking progress in https://github.com/xamarin/xamarin-macios/issues/10834
2021-03-13 10:38:46 -05:00
..
Mac [introspection] Stop hardcoding minimum OS versions. (#10582) 2021-02-08 07:34:02 +01:00
dotnet [dotnet] Update `Min*` constants and fix builds for tests (#10835) 2021-03-13 10:38:46 -05:00
iOS [main] Fix running introspection on iOS 11.4 simulators (#10626) 2021-02-11 22:40:55 -05:00
ApiAvailabilityTest.cs [dotnet] Update `Min*` constants and fix builds for tests (#10835) 2021-03-13 10:38:46 -05:00
ApiBaseTest.cs [tests] Remove Classic code from all tests. (#8707) 2020-05-29 16:43:06 +02:00
ApiCMAttachmentTest.cs [Xcode12] Bring xcode 12 changes into main. 2020-09-23 16:05:22 -04:00
ApiClassPtrTest.cs [tests] Remove Classic code from all tests. (#8707) 2020-05-29 16:43:06 +02:00
ApiCoreImageFiltersTest.cs [xcode12.2] Initial commit for Xcode 12.2 Beta 3 (#9877) 2020-10-15 12:08:27 -04:00
ApiCtorInitTest.cs [tests][xcode12.2] Fix xammac tests (#9935) 2020-10-21 17:12:48 -04:00
ApiFieldTest.cs [xcode12] Bump for beta 1 (#8935) 2020-06-26 14:02:44 -04:00
ApiFrameworkTest.cs [tests] Remove Classic code from all tests. (#8707) 2020-05-29 16:43:06 +02:00
ApiPInvokeTest.cs Bump .NET to 6.0.100-preview.2.21114.3. (#10666) 2021-02-23 07:49:09 +01:00
ApiProtocolTest.cs [gamecontroller] Update for Xcode 12.3 beta 1 (#10228) 2020-12-07 17:23:13 -05:00
ApiSelectorTest.cs [ARKit] Update bindings to Xcode 12.3 Beta 1 (#10158) 2020-11-26 10:26:04 -05:00
ApiSignatureTest.cs [tests] Remove Classic code from all tests. (#8707) 2020-05-29 16:43:06 +02:00
ApiStructTest.cs [tests] Remove Classic code from all tests. (#8707) 2020-05-29 16:43:06 +02:00
ApiTypeTest.cs [xcode11.4] [tests] Add `.cctor` execution to introspection (#7987) 2020-02-26 16:16:04 -05:00
ApiTypoTest.cs [tests][intro] ConstantsCheck should only be executed on latest OS (#9751) 2020-10-01 22:38:06 -04:00
ApiWeakPropertyTest.cs [tests] Remove Classic code from all tests. (#8707) 2020-05-29 16:43:06 +02:00
CoreSelectorTest.cs [xcode12] Introspection-based fixes for Big Sur (#9632) 2020-09-15 08:56:24 -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