예제 #1
0
        public void ReleaseReferenceTest()
        {
            Vector2Container v = OptimizedPool <Vector2Container> .Get();

            OptimizedPool <Vector2Container> .Release(v);

            Assert.DoesNotThrow(delegate {
                OptimizedPool <Vector2Container> .Get();
            });
        }
예제 #2
0
        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
        }
예제 #3
0
        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
        }
예제 #4
0
        public void GetReferenceTest()
        {
            Vector2Container v = OptimizedPool <Vector2Container> .Get();

            Assert.NotNull(v);
        }