private void TestFreeAfterDispose()
        {
            Skip.IfNot(RuntimeInformation.IsOSPlatform(OSPlatform.Linux));

            Debug.WriteLine("\nLinuxOpenSSL11ProtectedMemoryAllocatorTest ctor");
            linuxOpenSSL11ProtectedMemoryAllocatorLP64 = new LinuxOpenSSL11ProtectedMemoryAllocatorLP64(configuration);

            linuxOpenSSL11ProtectedMemoryAllocatorLP64.Dispose();

            var exception = Assert.Throws <Exception>(() =>
            {
                linuxOpenSSL11ProtectedMemoryAllocatorLP64.Free(new IntPtr(-1), 0);
            });

            Assert.Equal("Called Free on disposed LinuxOpenSSL11ProtectedMemoryAllocatorLP64", exception.Message);
        }
 public void Dispose()
 {
     linuxOpenSSL11ProtectedMemoryAllocatorLP64?.Dispose();
     Debug.WriteLine("LinuxOpenSSL11ProtectedMemoryAllocatorTest Dispose\n");
 }
Esempio n. 3
0
 public void Dispose()
 {
     linuxOpenSSL11ProtectedMemoryAllocatorLP64?.Dispose();
 }