edu.rice.cs.javalanglevels
Class IntermediateLevelTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
edu.rice.cs.javalanglevels.IntermediateLevelTest
- All Implemented Interfaces:
- Test
public class IntermediateLevelTest
- extends TestCase
This is a high-level test to make sure that taking an Intermediate 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/forIntermediateLevelTest folder
as .dj1 files, and the expected augmented files asre also placed in the testFiles/forIntermediateLevelTest
folder with the same name, but a .expected extension. Files that are expected to generate errors are
placed in the testFiles/forIntermediateLevelTest/shouldBreak folder, as .dj1 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 |
IntermediateLevelTest
public IntermediateLevelTest()
setUp
public void setUp()
- Overrides:
setUp in class TestCase
assertEquals
public void assertEquals(String s,
Data answer,
Data testValue)
testSuccessful
public void testSuccessful()
- Test that files that are correct can be processed with no errors and result in the expected augmented file.
Yay.dj1 is designed to be handled as a 1.4 file, so ignore it here.
testShouldBeErrors
public void testShouldBeErrors()
- Ensure that files that are incorrect do actually throw errors.
test14Augmentation
public void test14Augmentation()
- Make sure that 1.4 augmentation rules are correctly followed for Yay.dj1