Class ThreadLocalRandomTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by JSR166TestCase
              extended by ThreadLocalRandomTest
All Implemented Interfaces:
junit.framework.Test

public class ThreadLocalRandomTest
extends JSR166TestCase


Nested Class Summary
 
Nested classes/interfaces inherited from class JSR166TestCase
JSR166TestCase.AdjustablePolicy, JSR166TestCase.CallableOne, JSR166TestCase.CheckedBarrier, JSR166TestCase.CheckedCallable<T>, JSR166TestCase.CheckedInterruptedCallable<T>, JSR166TestCase.CheckedInterruptedRunnable, JSR166TestCase.CheckedRecursiveAction, JSR166TestCase.CheckedRecursiveTask<T>, JSR166TestCase.CheckedRunnable, JSR166TestCase.LongPossiblyInterruptedRunnable, JSR166TestCase.MediumInterruptedRunnable, JSR166TestCase.MediumPossiblyInterruptedRunnable, JSR166TestCase.MediumRunnable, JSR166TestCase.NoOpCallable, JSR166TestCase.NoOpREHandler, JSR166TestCase.NoOpRunnable, JSR166TestCase.NPETask, JSR166TestCase.RunnableShouldThrow, JSR166TestCase.ShortInterruptedRunnable, JSR166TestCase.ShortRunnable, JSR166TestCase.SimpleThreadFactory, JSR166TestCase.SmallCallable, JSR166TestCase.SmallPossiblyInterruptedRunnable, JSR166TestCase.SmallRunnable, JSR166TestCase.StringTask, JSR166TestCase.ThreadShouldThrow, JSR166TestCase.TrackedCallable, JSR166TestCase.TrackedLongRunnable, JSR166TestCase.TrackedMediumRunnable, JSR166TestCase.TrackedNoOpRunnable, JSR166TestCase.TrackedRunnable, JSR166TestCase.TrackedShortRunnable, JSR166TestCase.TrackedSmallRunnable
 
Field Summary
 
Fields inherited from class JSR166TestCase
eight, expensiveTests, five, four, LONG_DELAY_MS, m1, m10, m2, m3, m4, m5, m6, MEDIUM_DELAY_MS, nine, one, seven, SHORT_DELAY_MS, six, SIZE, SMALL_DELAY_MS, TEST_STRING, three, two, zero
 
Constructor Summary
ThreadLocalRandomTest()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static junit.framework.Test suite()
           
 void testNextBoolean()
          Repeated calls to nextBoolean produce at least one different result
 void testNextDouble()
          Repeated calls to nextDouble produce at least one different result
 void testNextDoubleBounded2()
          nextDouble(least, bound) returns least <= value < bound; repeated calls produce at least one different result
 void testNextFloat()
          Repeated calls to nextFloat produce at least one different result
 void testNextGaussian()
          Repeated calls to nextGaussian produce at least one different result
 void testNextInt()
          Repeated calls to nextInt produce at least one different result
 void testNextIntBadBounds()
          nextInt(least >= bound) throws IllegalArgumentException;
 void testNextIntBounded()
          nextInt(bound) returns 0 <= value < bound; repeated calls produce at least one different result
 void testNextIntBounded2()
          nextInt(least, bound) returns least <= value < bound; repeated calls produce at least one different result
 void testNextIntBoundedNeg()
          nextInt(negative) throws IllegalArgumentException;
 void testNextLong()
          Repeated calls to nextLong produce at least one different result
 void testNextLongBadBounds()
          nextLong(least >= bound) throws IllegalArgumentException;
 void testNextLongBounded()
          nextLong(bound) returns 0 <= value < bound; repeated calls produce at least one different result
 void testNextLongBounded2()
          nextLong(least, bound) returns least <= value < bound; repeated calls produce at least one different result
 void testNextLongBoundedNeg()
          nextLong(negative) throws IllegalArgumentException;
 void testSetSeed()
          setSeed throws UnsupportedOperationException
 
Methods inherited from class JSR166TestCase
assertThreadJoinTimesOut, awaiter, checkEmpty, delay, getShortDelay, joinPool, latchAwaitingStringTask, newTestSuite, permissivePolicy, possiblyInterruptedRunnable, runTest, runTestProfiled, runWithoutPermissions, runWithPermissions, setDelays, setUp, shouldThrow, shouldThrow, tearDown, threadAssertEquals, threadAssertEquals, threadAssertFalse, threadAssertNull, threadAssertSame, threadAssertTrue, threadFail, threadRecordFailure, threadShouldThrow, threadShouldThrow, threadUnexpectedException, trackedRunnable
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, 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

ThreadLocalRandomTest

public ThreadLocalRandomTest()
Method Detail

main

public static void main(java.lang.String[] args)

suite

public static junit.framework.Test suite()

testSetSeed

public void testSetSeed()
setSeed throws UnsupportedOperationException


testNextInt

public void testNextInt()
Repeated calls to nextInt produce at least one different result


testNextLong

public void testNextLong()
Repeated calls to nextLong produce at least one different result


testNextBoolean

public void testNextBoolean()
Repeated calls to nextBoolean produce at least one different result


testNextFloat

public void testNextFloat()
Repeated calls to nextFloat produce at least one different result


testNextDouble

public void testNextDouble()
Repeated calls to nextDouble produce at least one different result


testNextGaussian

public void testNextGaussian()
Repeated calls to nextGaussian produce at least one different result


testNextIntBoundedNeg

public void testNextIntBoundedNeg()
nextInt(negative) throws IllegalArgumentException;


testNextIntBadBounds

public void testNextIntBadBounds()
nextInt(least >= bound) throws IllegalArgumentException;


testNextIntBounded

public void testNextIntBounded()
nextInt(bound) returns 0 <= value < bound; repeated calls produce at least one different result


testNextIntBounded2

public void testNextIntBounded2()
nextInt(least, bound) returns least <= value < bound; repeated calls produce at least one different result


testNextLongBoundedNeg

public void testNextLongBoundedNeg()
nextLong(negative) throws IllegalArgumentException;


testNextLongBadBounds

public void testNextLongBadBounds()
nextLong(least >= bound) throws IllegalArgumentException;


testNextLongBounded

public void testNextLongBounded()
nextLong(bound) returns 0 <= value < bound; repeated calls produce at least one different result


testNextLongBounded2

public void testNextLongBounded2()
nextLong(least, bound) returns least <= value < bound; repeated calls produce at least one different result


testNextDoubleBounded2

public void testNextDoubleBounded2()
nextDouble(least, bound) returns least <= value < bound; repeated calls produce at least one different result