edu.rice.cs.util
Class StringOpsTest

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.util.StringOpsTest
All Implemented Interfaces:
Test

public class StringOpsTest
extends DrJavaTestCase

Test functions of StringOps.


Field Summary
 
Fields inherited from class edu.rice.cs.drjava.DrJavaTestCase
TEST_DRJAVA_CONFIG_PROPERTY
 
Constructor Summary
StringOpsTest()
           
 
Method Summary
 void testCommandLineToLists_Pipe()
           
 void testCommandLineToLists_PipeAndSeq()
           
 void testCommandLineToLists_Seq()
           
 void testCommandLineToLists()
           
 void testConvertToLiteral()
          Tests converting a string to a literal
 void testGetOffsetAndLength()
          Test the getOffsetAndLength() method of StringOps class.
 void testGetSimpleName()
          Tests for getting the simple name of a class.
 void testGetStackTrace()
          Tests that getting the stack trace of a throwable works correctly.
 void testMemSizeToString()
           
 void testReplace()
          Test the replace() method of StringOps class.
 void testReplaceVariables()
           
 void testReplaceVariables2()
           
 void testReplaceVariables3()
           
 void testToStringBoolean()
           
 void testToStringByte()
           
 void testToStringChar()
           
 void testToStringDouble()
           
 void testToStringFloat()
           
 void testToStringInt()
           
 void testToStringLong()
          Tests for getting the simple name of a class.
 void testToStringObject()
           
 void testToStringShort()
           
 
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

StringOpsTest

public StringOpsTest()
Method Detail

testReplace

public void testReplace()
Test the replace() method of StringOps class.


testGetOffsetAndLength

public void testGetOffsetAndLength()
Test the getOffsetAndLength() method of StringOps class.


testGetStackTrace

public void testGetStackTrace()
Tests that getting the stack trace of a throwable works correctly.


testConvertToLiteral

public void testConvertToLiteral()
Tests converting a string to a literal


testGetSimpleName

public void testGetSimpleName()
Tests for getting the simple name of a class.


testToStringLong

public void testToStringLong()
Tests for getting the simple name of a class. Works by comparing with Java 1.5.0's Class.getSimpleName(). This test is commented out to remove it from regular unit testing because it is incompatible with Java 1.4.


testToStringInt

public void testToStringInt()

testToStringShort

public void testToStringShort()

testToStringChar

public void testToStringChar()

testToStringByte

public void testToStringByte()

testToStringBoolean

public void testToStringBoolean()

testToStringFloat

public void testToStringFloat()

testToStringDouble

public void testToStringDouble()

testToStringObject

public void testToStringObject()

testMemSizeToString

public void testMemSizeToString()

testCommandLineToLists

public void testCommandLineToLists()

testCommandLineToLists_Pipe

public void testCommandLineToLists_Pipe()

testCommandLineToLists_Seq

public void testCommandLineToLists_Seq()

testCommandLineToLists_PipeAndSeq

public void testCommandLineToLists_PipeAndSeq()

testReplaceVariables

public void testReplaceVariables()

testReplaceVariables2

public void testReplaceVariables2()

testReplaceVariables3

public void testReplaceVariables3()