779f064d04
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); |
||
---|---|---|
.. | ||
ApiAvailabilityTest.cs | ||
ApiCapitalizationTest.cs | ||
ApiTest.KnownFailures.cs | ||
ApiTest.cs | ||
AttributeTest.cs | ||
BlittablePInvokes.KnownFailures.cs | ||
BlittablePInvokes.cs | ||
CecilExtensions.cs | ||
ConstructorTest.cs | ||
EnumTest.cs | ||
GenericPInvokes.cs | ||
GetterExceptionTest.cs | ||
Helper.cs | ||
Makefile | ||
MarshalAsTest.cs | ||
ObsoleteTest.cs | ||
OpenTKTest.cs | ||
README.md | ||
Test.cs | ||
cecil-tests.csproj | ||
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...