edu.rice.cs.javalanglevels
Class ElementaryLevelTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
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.
| 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 |
ElementaryLevelTest
public ElementaryLevelTest()
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.