Ejemplo n.º 1
0
		public virtual void  TestResize()
		{
			TermAttributeImpl t = new TermAttributeImpl();
			char[] content = "hello".ToCharArray();
			t.SetTermBuffer(content, 0, content.Length);
			for (int i = 0; i < 2000; i++)
			{
				t.ResizeTermBuffer(i);
				Assert.IsTrue(i <= t.TermBuffer().Length);
				Assert.AreEqual("hello", t.Term());
			}
		}
Ejemplo n.º 2
0
        public virtual void  TestResize()
        {
            TermAttributeImpl t = new TermAttributeImpl();

            char[] content = "hello".ToCharArray();
            t.SetTermBuffer(content, 0, content.Length);
            for (int i = 0; i < 2000; i++)
            {
                t.ResizeTermBuffer(i);
                Assert.IsTrue(i <= t.TermBuffer().Length);
                Assert.AreEqual("hello", t.Term());
            }
        }