edu.rice.cs.javalanglevels
Class ElementaryLevelTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by edu.rice.cs.javalanglevels.ElementaryLevelTest
All Implemented Interfaces:
Test

public class ElementaryLevelTest
extends TestCase

This is a high-level test to make sure that taking an Elementary Level file from source file to augmented file has the correct behavior, does not throw errors when it should not, throws errors when it should, and results in the correct augmented code. Files that should be successfully tested are placed in the testFiles/forElementaryLevelTest folder as .dj0 files, and the expected augmented files asre also placed in the testFiles/forElementaryLevelTest folder with the same name, but a .expected extension. Files that are expected to generate errors are placed in the testFiles/forElementaryLevelTest/shouldBreak folder, as .dj0 files. Other subdirectories are used for other tests.


Constructor Summary
ElementaryLevelTest()
           
 
Method Summary
static String lf(String s)
          Convert whatever line feeds (\n, \r, \r\n) are in the string to just \n, ignoring trailing whitespace.
 void setUp()
           
 void testEmptyFileNoAction()
          An empty file should not get converted to a .java file.
 void testOrderMatters()
           
 void testRequiresAutoboxing()
           
 void testShouldBeErrors()
           
 void testSomeFilesCompiled()
          Tests that when some files have already been compiled, the .java files are not generated for those files, and files that reference those files are augmented correctly.
 void testSuccessful()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ElementaryLevelTest

public ElementaryLevelTest()
Method Detail

setUp

public void setUp()
Overrides:
setUp in class TestCase

testSuccessful

public void testSuccessful()

testShouldBeErrors

public void testShouldBeErrors()

testSomeFilesCompiled

public void testSomeFilesCompiled()
Tests that when some files have already been compiled, the .java files are not generated for those files, and files that reference those files are augmented correctly.


testOrderMatters

public void testOrderMatters()

testEmptyFileNoAction

public void testEmptyFileNoAction()
An empty file should not get converted to a .java file.


testRequiresAutoboxing

public void testRequiresAutoboxing()

lf

public static String lf(String s)
Convert whatever line feeds (\n, \r, \r\n) are in the string to just \n, ignoring trailing whitespace.