public void ReleaseReferenceTest() { Vector2Container v = OptimizedPool <Vector2Container> .Get(); OptimizedPool <Vector2Container> .Release(v); Assert.DoesNotThrow(delegate { OptimizedPool <Vector2Container> .Get(); }); }
public void GetReferenceWhenExceedCapacityThrowsExceptionIfSafeModeIsNotActiveTest() { #if !OT_SAFE_MODE OptimizedPool <Vector2Container> .Get(); Assert.Throws <System.ArgumentOutOfRangeException> (delegate { OptimizedPool <Vector2Container> .Get(); }); #else Assert.Ignore("Test ignored on Safe Mode"); #endif }
public void GetReferenceWhenExceedCapacityIncreasePoolSizeInsteadThrowingExceptionTest() { #if OT_SAFE_MODE OptimizedPool <Vector2Container> .Get(); Assert.DoesNotThrow(delegate { OptimizedPool <Vector2Container> .Get(); }); #else Assert.Ignore("Test ignored when Safe Mode is disabled"); #endif }
public void GetReferenceTest() { Vector2Container v = OptimizedPool <Vector2Container> .Get(); Assert.NotNull(v); }