xamarin-macios/tests/cecil-tests
Rolf Bjarne Kvinge 779f064d04
[src] Add a TransientCFString struct. (#19763)
In order to make it easier to pass C-style strings to P/Invokes, we
introduced
a TransientString struct some time ago.

This works quite well, so I implemented the same for CFStrings - a
TransientCFString struct - and started using it in a few places. The
idea
would be to slowly start migrating our codebase to this new pattern.

Instead of:

    var ptr = CFString.CreateNative ("somestring");
    try {
    	CallPInvoke (ptr);
    } finally {
    	CFString.ReleaseNative (ptr);
    }

we'll do:

    using var ptr = new TransientCFString ("somestring");
    CallPInvoke (ptr);
2024-01-11 09:39:27 +01:00
..
ApiAvailabilityTest.cs
ApiCapitalizationTest.cs
ApiTest.KnownFailures.cs [Metal] Add support for Xcode15. (#19379) 2023-12-12 17:39:56 -05:00
ApiTest.cs [tests] Don't pass a message to Assert.Ignore. (#19453) 2023-11-15 18:12:58 +01:00
AttributeTest.cs [tests] Port the ModelMustBeProtocol test from monotouch-test to cecil-test. (#19561) 2023-12-04 08:25:07 +01:00
BlittablePInvokes.KnownFailures.cs [UIKit] Make P/Invokes have blittable signatures. (#19725) 2024-01-08 07:42:48 +01:00
BlittablePInvokes.cs [tests] ByRef types (out/ref parameters) aren't blittable, so mark them as such. (#19668) 2023-12-19 16:35:22 +01:00
CecilExtensions.cs [src] Add a TransientCFString struct. (#19763) 2024-01-11 09:39:27 +01:00
ConstructorTest.cs [AppKit] Add support for Xcode 15. (#19119) 2023-10-23 21:39:29 -04:00
EnumTest.cs
GenericPInvokes.cs
GetterExceptionTest.cs
Helper.cs [Tests] Make cecil test failures readable. (#19772) 2024-01-10 07:18:18 -05:00
Makefile
MarshalAsTest.cs
ObsoleteTest.cs
OpenTKTest.cs
README.md
Test.cs
cecil-tests.csproj Get Mono.Cecil from NuGet everywhere. (#19535) 2023-12-04 20:15:03 +01:00
cecil-tests.sln

README.md

Cecil-based Tests

Even with the huge variety of tests that we have there's still a few things that are hard to test properly. Some of them can be tested by analyzing the assemblies (IL or metadata). So here we are...