src/textgen/MyLinkedListTester.java
/** Test removing an element from the list.
	 * We've included the example from the concept challenge.
	 * You will want to add more tests.  */
Test removing an element from the list.
We've included the example from the concept challenge.
You will want to add more tests.
Test removing an element from the list . We ' ve included the example from the concept challenge . You will want to add more tests .
@Test
	public void testRemove()
	{
		int a = list1.remove(0);
		assertEquals("Remove: check a is correct ", 65, a);
		assertEquals("Remove: check element 0 is correct ", (Integer)21, list1.get(0));
		assertEquals("Remove: check size is correct ", 2, list1.size());
		assertEquals("Remove: check if head is correct",list1.head,list1.head.next.prev);
		System.out.println(" : testRemove list1 : "+list1.toString());
		int a2 = list1.remove(1);
		assertEquals("Remove: check a is correct ", 42, a2);
		try{
			list1.get(1);
			fail("check out of bound");
		} catch(Exception e){
		}
		assertEquals("Remove: check size is correct ", 1, list1.size());
		assertEquals("Remove: check if prev is correct",(Integer)21,list1.get(0));
	}
@ Test public void testRemove ( ) { int a = list1 . remove ( 0 ) ; assertEquals ( "Remove: check a is correct " , 65 , a ) ; assertEquals ( "Remove: check element 0 is correct " , ( Integer ) 21 , list1 . get ( 0 ) ) ; assertEquals ( "Remove: check size is correct " , 2 , list1 . size ( ) ) ; assertEquals ( "Remove: check if head is correct" , list1 . head , list1 . head . next . prev ) ; System . out . println ( " : testRemove list1 : " + list1 . toString ( ) ) ; int a2 = list1 . remove ( 1 ) ; assertEquals ( "Remove: check a is correct " , 42 , a2 ) ; try { list1 . get ( 1 ) ; fail ( "check out of bound" ) ; } catch ( Exception e ) { } assertEquals ( "Remove: check size is correct " , 1 , list1 . size ( ) ) ; assertEquals ( "Remove: check if prev is correct" , ( Integer ) 21 , list1 . get ( 0 ) ) ; }
Test removing an element from the list.
Test removing an element from the list .