xamarin-macios/tests/introspection
Alex Soto 4486eb3b9f Merge remote-tracking branch 'xamarin/main' into dev/alex/main-net9.0 2024-07-11 18:53:54 -04:00
..
Mac [tests] Bump min OS versions in all tests. 2024-02-28 12:08:24 +01:00
dotnet [Introspection] Fix a number of failing tests. 2023-08-04 11:47:28 -04:00
iOS Merge remote-tracking branch 'xamarin/main' into dev/alex/main-net9.0 2024-07-11 18:53:54 -04:00
ApiAvailabilityTest.cs Change all null checking expressions to use 'is' and 'is not'. (#18176) 2023-05-05 17:52:19 +02:00
ApiBaseTest.cs [Introspection] Fix intro skip when the properties are internal. 2023-08-04 11:49:45 -04:00
ApiCMAttachmentTest.cs [net9.0] Update dependencies from dotnet/sdk (#20794) 2024-07-11 19:58:14 +02:00
ApiClassPtrTest.cs Change all null checking expressions to use 'is' and 'is not'. (#18176) 2023-05-05 17:52:19 +02:00
ApiCoreImageFiltersTest.cs Change all null checking expressions to use 'is' and 'is not'. (#18176) 2023-05-05 17:52:19 +02:00
ApiCtorInitTest.cs [CryptoTokenKit] Bind this framework. Fixes #7876. (#20587) 2024-05-29 20:38:40 +02:00
ApiFieldTest.cs [Introspection] Fix failing tests. 2023-08-04 11:47:29 -04:00
ApiFrameworkTest.cs [xcode15.3] Bump to Xcode 15.3 bindings (#20780) 2024-07-11 11:41:31 +02:00
ApiPInvokeTest.cs [net8.0] Merge main into net8.0. 2023-08-14 15:36:54 +02:00
ApiProtocolTest.cs [xcode15.4] Update bindings to Xcode 15.4 (#20865) 2024-07-11 14:09:52 -04:00
ApiSelectorTest.cs [xcode15.4] Update bindings to Xcode 15.4 (#20865) 2024-07-11 14:09:52 -04:00
ApiSignatureTest.cs [xcode15.3] Bump to Xcode 15.3 bindings (#20780) 2024-07-11 11:41:31 +02:00
ApiStructTest.cs Change all null checking expressions to use 'is' and 'is not'. (#18176) 2023-05-05 17:52:19 +02:00
ApiTypeTest.cs [net9.0] Update dependencies from dotnet/sdk (#20621) 2024-06-25 13:49:44 +02:00
ApiTypoTest.cs [xcode15.3] Bump to Xcode 15.3 bindings (#20780) 2024-07-11 11:41:31 +02:00
ApiWeakPropertyTest.cs [CoreText] Fix a few nullability issues in CTFontDescriptor. (#19439) 2023-11-21 07:59:13 +01:00
CoreSelectorTest.cs [autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
EnvironmentVariable.cs
README.md
xamarin1.png

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