commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jexl/src/test/org/apache/commons/jexl/parser ParserTest.java
Date Fri, 26 Apr 2002 04:46:27 GMT
geirm       02/04/25 21:46:27

  Added:       jexl/src/test/org/apache/commons/jexl/parser ParserTest.java
  Log:
  For basic parser tests
  
  Revision  Changes    Path
  1.1                  jakarta-commons-sandbox/jexl/src/test/org/apache/commons/jexl/parser/ParserTest.java
  
  Index: ParserTest.java
  ===================================================================
  package org.apache.commons.jexl.parser;
  
  import junit.framework.TestCase;
  import junit.framework.TestSuite;
  import junit.framework.Test;
  
  import java.io.StringReader;
  
  import org.apache.commons.jexl.JexlContext;
  import org.apache.commons.jexl.JexlHelper;
  
  /**
   *
   */
  public class ParserTest extends TestCase
  {
      public static Test suite()
      {
          return new TestSuite(ParserTest.class);
      }
  
      public ParserTest(String testName)
      {
          super(testName);
      }
  
      /**
        *  parse test : see if we can parse a little script
        */
       public void testParse1()
           throws Exception
       {
           Parser parser = new Parser(new StringReader(";"));
  
           SimpleNode sn = parser.parse(new StringReader("foo = 1;"));
  
           JexlContext jc = JexlHelper.createContext();
  
           sn.interpret(jc);
       }
  
      public static void main(String[] args)
          throws Exception
      {
          ParserTest pt = new ParserTest("foo");
  
          pt.testParse1();
      }
  
  }
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message