|
jxUtil 0.6 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--org.sourceforge.jxutil.IntRangesSetTest
Test the IntRangesSet implementation.
Field Summary | |
private Random |
rnd
The random number generator. |
Fields inherited from class junit.framework.TestCase |
|
Constructor Summary | |
IntRangesSetTest(String name)
Construct the Test instance. |
Method Summary | |
private void |
addRandom(Random rnd,
IntRangesSet is,
Set ts,
int num,
int m,
int ofs)
Add random integers. |
private void |
addRange(IntRangesSet is,
Set ts,
int min,
int max)
Add a range of integers. |
private void |
intact(IntRangesSet is)
Check the set's integrity. |
private void |
removeRandom(Random rnd,
IntRangesSet is,
Set ts,
int num,
int m,
int ofs)
Remove random integers. |
protected void |
setUp()
Set up the test. |
protected void |
tearDown()
Tear down the test. |
void |
testAdd()
Test the add operation. |
void |
testAddRange()
Test the addRange operation. |
void |
testComplement()
Test the complement operator. |
void |
testContains()
Test the contains operation. |
void |
testEquals()
Test the equals operation. |
void |
testIterator()
Test the Iterator implementation. |
private Object[] |
testRange(IntRangesSet is,
TreeSet ts,
int f,
int t)
Test a range. |
void |
testRemove()
Test the remove operation. |
void |
testToArray()
Test the toArray operation. |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private Random rnd
Constructor Detail |
public IntRangesSetTest(String name)
name
- The test's name.Method Detail |
private void addRandom(Random rnd, IntRangesSet is, Set ts, int num, int m, int ofs)
rnd
- The Random number generatoris
- The IntRangesSet to add the numbers tots
- The Set to add the same numbers tonum
- The number of randoms to generatem
- The maximum random numberofs
- The offset for the random number.private void addRange(IntRangesSet is, Set ts, int min, int max)
is
- The IntRangesSet to add the numbers tots
- The Set to add the same numbers tomin
- The minimum numbermax
- Tha maximum number.private void intact(IntRangesSet is)
is
- The IntRangesSet to test.private void removeRandom(Random rnd, IntRangesSet is, Set ts, int num, int m, int ofs)
rnd
- The Random number generatoris
- The IntRangesSet to remove the numbers fromts
- The Set to remove the same numbers fromnum
- The number of randoms to generatem
- The maximum random numberofs
- The offset for the random number.protected void setUp()
setUp
in class TestCase
protected void tearDown()
tearDown
in class TestCase
public void testAdd()
public void testAddRange()
public void testComplement()
public void testContains()
public void testEquals()
public void testIterator()
private Object[] testRange(IntRangesSet is, TreeSet ts, int f, int t)
public void testRemove()
public void testToArray()
|
jxUtil 0.6 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |