Package test.dbc.stack

Examples of test.dbc.stack.Stack


  }
 
   public void testStack()throws Exception
   {
     System.out.println("****************** TEST STACK ******************");
      Stack s = new StackImpl();
      s.push("one");
      s.push("two");
      s.pop();

      s.push("two");
      s.push("three");
      s.pop();
      s.pop();
      s.pop();
      try
      {
         s.pop();
        throw new Exception("Did not validate empty stack before pop");
      }
      catch(RuntimeException e)
      {
         System.out.println(e.getMessage());
View Full Code Here


  }
 
   public void testStack()throws Exception
   {
     System.out.println("****************** TEST STACK ******************");
      Stack s = new StackImpl();
      s.push("one");
      s.push("two");
      s.pop();

      s.push("two");
      s.push("three");
      s.pop();
      s.pop();
      s.pop();
      try
      {
         s.pop();
        throw new Exception("Did not validate empty stack before pop");
      }
      catch(RuntimeException e)
      {
         System.out.println(e.getMessage());
View Full Code Here

  }
 
   public void testStack()throws Exception
   {
     System.out.println("****************** TEST STACK ******************");
      Stack s = new StackImpl();
      s.push("one");
      s.push("two");
      s.pop();

      s.push("two");
      s.push("three");
      s.pop();
      s.pop();
      s.pop();
      try
      {
         s.pop();
        throw new Exception("Did not validate empty stack before pop");
      }
      catch(RuntimeException e)
      {
         System.out.println(e.getMessage());
View Full Code Here

  }
 
   public void testStack()throws Exception
   {
     System.out.println("****************** TEST STACK ******************");
      Stack s = new StackImpl();
      s.push("one");
      s.push("two");
      s.pop();

      s.push("two");
      s.push("three");
      s.pop();
      s.pop();
      s.pop();
      try
      {
         s.pop();
        throw new Exception("Did not validate empty stack before pop");
      }
      catch(RuntimeException e)
      {
         System.out.println(e.getMessage());
View Full Code Here

TOP

Related Classes of test.dbc.stack.Stack

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.