Ejemplo n.º 1
0
        public void DisposeMakesUnusable()
        {
            NativeLongPtr intPtr = new NativeLongPtr(Allocator.Temp);

            intPtr.Dispose();
            Assert.That(
                () => intPtr.Value = 10,
                Throws.TypeOf <InvalidOperationException>());
        }
Ejemplo n.º 2
0
        public void IsCreatedOnlyReturnsTrueBeforeDispose()
        {
            NativeLongPtr intPtr = new NativeLongPtr(Allocator.Temp);

            Assert.That(intPtr.IsCreated, Is.True);

            intPtr.Dispose();

            Assert.That(intPtr.IsCreated, Is.False);
        }