edu.rice.cs.util.sexp
Class SExpParserTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by edu.rice.cs.drjava.DrJavaTestCase
              extended by edu.rice.cs.util.sexp.SExpParserTest
All Implemented Interfaces:
junit.framework.Test

public class SExpParserTest
extends DrJavaTestCase

A JUnit test case class. Every method starting with the word "test" will be called when running the test with JUnit.


Nested Class Summary
 
Nested classes/interfaces inherited from class junit.framework.TestCase
junit.framework.TestCase.WrappedException
 
Constructor Summary
SExpParserTest()
           
 
Method Summary
private  File _fillTempFile(String fname, String text)
          Creates a temporary file and writes the given string to that file
 void testCorrectParse()
           
 void testDifferentInputs()
          There are three ways to input the data to a parse.
 void testInvalidLowerLevel()
           
 void testParseMultiple()
          Tests to make sure that multiple top-level s-exps are parsed separately and in tact
 void testTopLevel()
           
 
Methods inherited from class edu.rice.cs.drjava.DrJavaTestCase
setConfigSetting, setDocText, setUp, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SExpParserTest

public SExpParserTest()
Method Detail

_fillTempFile

private File _fillTempFile(String fname,
                           String text)
Creates a temporary file and writes the given string to that file

Parameters:
fname - the name of the file to create
text - the text to write to the file
Returns:
the File that was created

testDifferentInputs

public void testDifferentInputs()
                         throws SExpParseException,
                                IOException
There are three ways to input the data to a parse. this tests to make sure they all three return the same thing.

Throws:
SExpParseException
IOException

testParseMultiple

public void testParseMultiple()
                       throws SExpParseException
Tests to make sure that multiple top-level s-exps are parsed separately and in tact

Throws:
SExpParseException

testTopLevel

public void testTopLevel()
                  throws SExpParseException
Throws:
SExpParseException

testInvalidLowerLevel

public void testInvalidLowerLevel()

testCorrectParse

public void testCorrectParse()
                      throws SExpParseException
Throws:
SExpParseException