Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static void testAfterInsertEnd() {
- SList lst1 = new SList();
- lst1.insertEnd(new Integer(6));
- lst1.insertEnd(new Integer(7));
- System.out.println();
- System.out.println("Here is a list after insertEnd 6, 7: "
- + lst1.toString());
- System.out.println("isEmpty() should be false. It is: " +
- lst1.isEmpty());
- TestHelper.verify(lst1.isEmpty() == false,
- "isEmpty() after insertEnd failed");
- System.out.println("length() should be 2. It is: " +
- lst1.length());
- TestHelper.verify(lst1.length() == 2,
- "length() after insertEndfailed");
- lst1.insertFront(new Integer(5));
- System.out.println("Here is the same list after insertFront(5): "
- + lst1.toString());
- TestHelper.verify(lst1.toString().equals("[ 5 6 7 ]"),
- "insertFront after insertEnd failed");
- }
- }
Add Comment
Please, Sign In to add comment