xamarin-macios/tests/introspection
Rolf Bjarne Kvinge 83b0727967
[tests] Port and improve the availability attribute test from introspection. (#17083)
Port the availability attribute test from introspection to cecil-tests. It's much
easier and faster to test attributes using Cecil using a desktop executable than
having to execute a test app on each target platform.

This also means that we can make the ApiAvailabilityTest in introspection
legacy-only.

Ref: https://github.com/xamarin/xamarin-macios/issues/10834
2022-12-20 12:46:06 +01:00
..
Mac [autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
dotnet [tests] Create a shared AppDelegate class and use it everywhere. (#16877) 2022-11-28 18:17:49 +01:00
iOS Remove bitcode-related code, since bitcode is dead. (#16986) 2022-12-12 15:25:37 +01:00
ApiAvailabilityTest.cs [tests] Port and improve the availability attribute test from introspection. (#17083) 2022-12-20 12:46:06 +01:00
ApiBaseTest.cs [autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
ApiCMAttachmentTest.cs [autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
ApiClassPtrTest.cs [autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
ApiCoreImageFiltersTest.cs [autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
ApiCtorInitTest.cs [autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
ApiFieldTest.cs [autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
ApiFrameworkTest.cs [autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
ApiPInvokeTest.cs [autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
ApiProtocolTest.cs [autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
ApiSelectorTest.cs [autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
ApiSignatureTest.cs [autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
ApiStructTest.cs [autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
ApiTypeTest.cs [autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
ApiTypoTest.cs [autoformat] Add all of tests/. (#16857) 2022-12-05 08:23:34 +01:00
ApiWeakPropertyTest.cs Fix most but not all intro. 2022-06-27 10:01:29 -04:00
CoreSelectorTest.cs [autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01: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