Esempio n. 1
0
        public virtual void TestResize()
        {
            Token t = new Token();

            char[] content = "hello".ToCharArray();
            t.CopyBuffer(content, 0, content.Length);
            for (int i = 0; i < 2000; i++)
            {
                t.ResizeBuffer(i);
                Assert.IsTrue(i <= t.Buffer().Length);
                Assert.AreEqual("hello", t.ToString());
            }
        }