/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.core.lists.rings; import gplx.*; import gplx.core.*; import gplx.core.lists.*;
import org.junit.*; import gplx.core.tests.*;
public class Ring__long__tst {
	private final    Ring__long__fxt fxt = new Ring__long__fxt();
	@Test   public void Basic__1()	{fxt.Clear().Add(1)												.Test__to_ary(1);}
	@Test   public void Basic__2()	{fxt.Clear().Add(1, 2)											.Test__to_ary(1, 2);}
	@Test   public void Basic__3()	{fxt.Clear().Add(1, 2, 3)										.Test__to_ary(1, 2, 3);}
	@Test   public void Wrap__1()	{fxt.Clear().Add(1, 2, 3, 4)									.Test__to_ary(2, 3, 4);}
	@Test   public void Wrap__2()	{fxt.Clear().Add(1, 2, 3, 4, 5)									.Test__to_ary(3, 4, 5);}
	@Test   public void Wrap__3()	{fxt.Clear().Add(1, 2, 3, 4, 5, 6)								.Test__to_ary(4, 5, 6);}
}
class Ring__long__fxt {
	private Ring__long ring = new Ring__long(3);
	public Ring__long__fxt Clear() {ring.Clear(); return this;}
	public Ring__long__fxt Add(long... ary) {
		for (long itm : ary)
 				ring.Add(itm);
		return this;
	}
	public Ring__long__fxt Test__to_ary(long... expd) {
		Gftest.Eq__ary(expd, ring.To_ary(), "to_ary");
		return this;
	}
}
