a2e2fef0c2
The logic seems to want to verify MPSPredicate on maOS 10.14, but not on macOS 10.15+. But checking for macOS 10.14 is always successful on macOS 10.15+, which means that we can't check for macOS 10.14 before checking macOS 10.15. So I moved the macOS 10.14 check to after the macOS 10.15 check, but that made the macOS 10.14 check redundant, because both branches of the condition did the same thing, so I removed the whole check. Fixes this introspectionf failure: [FAIL] DefaultCtorAllowed : 1 potential errors found in 1387 default ctor validated: Default constructor not allowed for MetalPerformanceShaders.MPSPredicate : Could not initialize an instance of the type 'MetalPerformanceShaders.MPSPredicate': the native 'init' method returned nil. |
||
---|---|---|
.. | ||
Mac | ||
dotnet | ||
iOS | ||
ApiAvailabilityTest.cs | ||
ApiBaseTest.cs | ||
ApiCMAttachmentTest.cs | ||
ApiClassPtrTest.cs | ||
ApiCoreImageFiltersTest.cs | ||
ApiCtorInitTest.cs | ||
ApiFieldTest.cs | ||
ApiFrameworkTest.cs | ||
ApiPInvokeTest.cs | ||
ApiProtocolTest.cs | ||
ApiSelectorTest.cs | ||
ApiSignatureTest.cs | ||
ApiStructTest.cs | ||
ApiTypeTest.cs | ||
ApiTypoTest.cs | ||
ApiWeakPropertyTest.cs | ||
CoreSelectorTest.cs | ||
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