public void DisposeMakesUnusable() { NativeLongPtr intPtr = new NativeLongPtr(Allocator.Temp); intPtr.Dispose(); Assert.That( () => intPtr.Value = 10, Throws.TypeOf <InvalidOperationException>()); }
public void IsCreatedOnlyReturnsTrueBeforeDispose() { NativeLongPtr intPtr = new NativeLongPtr(Allocator.Temp); Assert.That(intPtr.IsCreated, Is.True); intPtr.Dispose(); Assert.That(intPtr.IsCreated, Is.False); }