@Test public void testReverse() { HeadList list = new HeadList(); list.add(17); list.add(42); list.add(1337); list.add(-90); list.add(0); assertList(list, "[17,42,1337,-90,0]"); list.reverse(); assertList(list, "[0,-90,1337,42,17]"); list = new HeadList(); list.reverse(); assertList(list, "[]"); list = new HeadList(); list.add(0); list.reverse(); assertList(list, "[0]"); list = new HeadList(); list.add(1); list.add(2); list.reverse(); assertList(list, "[2,1]"); }
public void reverse() { }
HeadList { public void reverse() { } }
HeadList { public void reverse() { } HeadList(); }
HeadList { public void reverse() { } HeadList(); void add(int info); int remove(int index); void reverse(); @Override String toString(); static void main(String[] args); }
HeadList { public void reverse() { } HeadList(); void add(int info); int remove(int index); void reverse(); @Override String toString(); static void main(String[] args);  }