edu.rice.cs.javalanglevels
Class IntermediateLevelTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by 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.


Constructor Summary
IntermediateLevelTest()
           
 
Method Summary
 void assertEquals(String s, Data answer, Data testValue)
           
 void setUp()
           
 void test14Augmentation()
          Make sure that 1.4 augmentation rules are correctly followed for Yay.dj1
 void testShouldBeErrors()
          Ensure that files that are incorrect do actually throw errors.
 void testSuccessful()
          Test that files that are correct can be processed with no errors and result in the expected augmented file.
 
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

IntermediateLevelTest

public IntermediateLevelTest()
Method Detail

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