Beispiel #1
0
        public void PooledStack_GetInstance()
        {
            for (var i = 0; i < 100; i++)
            {
                var stack = PooledStack <string> .GetInstance();

                Assert.AreEqual(0, stack.Count);

                stack.Push("qux");
                stack.Push("foo");
                stack.Push("bar");
                stack.Push("baz");

                Assert.IsTrue(exp.SequenceEqual(stack));

                stack.Free();
            }
        }