edu.rice.cs.drjava.model.compiler
Class CompilerErrorModelTest

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.drjava.model.compiler.CompilerErrorModelTest
All Implemented Interfaces:
Test

public final class CompilerErrorModelTest
extends DrJavaTestCase

Tests the CompilerErrorModel.

Version:
$Id: CompilerErrorModelTest.java 4691 2008-12-02 23:33:27Z dlsmith $

Field Summary
 
Fields inherited from class edu.rice.cs.drjava.DrJavaTestCase
TEST_DRJAVA_CONFIG_PROPERTY
 
Constructor Summary
CompilerErrorModelTest()
           
 
Method Summary
 void testConstructDoclessErrors()
          Tests CompilerErrorModel setup code with only errors without files.
 void testConstructManyDocsWithBoth()
          Tests CompilerErrorModel setup code with several files and errors both with and without line numbers.
 void testConstructManyDocsWithLineNums()
          Tests CompilerErrorModel setup code with several files and only errors with line numbers.
 void testConstructManyDocsWithoutLineNums()
          Tests CompilerErrorModel setup code with several files and only errors without line numbers.
 void testConstructNoErrors()
          Tests CompilerErrorModel setup code with no compiler errors.
 void testConstructOneDocWithBoth()
          Tests CompilerErrorModel setup code with one file and errors both with and without line numbers.
 void testConstructOneDocWithLineNums()
          Tests CompilerErrorModel setup code with one file and only errors with line numbers.
 void testConstructOneDocWithoutLineNums()
          Tests CompilerErrorModel setup code with one file and only errors without line numbers.
 void testConstructOnlyWarnings()
          Tests CompilerErrorModel setup code with only warnings without files.
 void testErrorsInMultipleDocuments()
           
 void testGetErrorAtOffset()
          Tests CompilerErrorModel.getErrorAtOffset(int).
 void testGetPosition()
          Tests CompilerErrorModel.getPosition(DJError).
 void testHasErrorsWithPositions()
          Tests CompilerErrorModel.hasErrorsWithPositions(OpenDefinitionsDocument).
 
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

CompilerErrorModelTest

public CompilerErrorModelTest()
Method Detail

testConstructNoErrors

public void testConstructNoErrors()
Tests CompilerErrorModel setup code with no compiler errors.


testConstructOnlyWarnings

public void testConstructOnlyWarnings()
Tests CompilerErrorModel setup code with only warnings without files. Also tests hasOnlyWarnings logic.


testConstructDoclessErrors

public void testConstructDoclessErrors()
Tests CompilerErrorModel setup code with only errors without files.


testConstructOneDocWithoutLineNums

public void testConstructOneDocWithoutLineNums()
Tests CompilerErrorModel setup code with one file and only errors without line numbers.


testConstructOneDocWithLineNums

public void testConstructOneDocWithLineNums()
Tests CompilerErrorModel setup code with one file and only errors with line numbers.


testConstructOneDocWithBoth

public void testConstructOneDocWithBoth()
Tests CompilerErrorModel setup code with one file and errors both with and without line numbers.


testConstructManyDocsWithoutLineNums

public void testConstructManyDocsWithoutLineNums()
Tests CompilerErrorModel setup code with several files and only errors without line numbers.


testConstructManyDocsWithLineNums

public void testConstructManyDocsWithLineNums()
Tests CompilerErrorModel setup code with several files and only errors with line numbers.


testConstructManyDocsWithBoth

public void testConstructManyDocsWithBoth()
Tests CompilerErrorModel setup code with several files and errors both with and without line numbers.


testGetPosition

public void testGetPosition()
Tests CompilerErrorModel.getPosition(DJError).


testGetErrorAtOffset

public void testGetErrorAtOffset()
                          throws IOException,
                                 OperationCanceledException
Tests CompilerErrorModel.getErrorAtOffset(int).

Throws:
IOException
OperationCanceledException

testHasErrorsWithPositions

public void testHasErrorsWithPositions()
                                throws IOException,
                                       OperationCanceledException
Tests CompilerErrorModel.hasErrorsWithPositions(OpenDefinitionsDocument).

Throws:
IOException
OperationCanceledException

testErrorsInMultipleDocuments

public void testErrorsInMultipleDocuments()
                                   throws IOException,
                                          OperationCanceledException
Throws:
IOException
OperationCanceledException