I have uploaded a short ANSI-C source code that can test the output of any PRNG using the TESTU01 test battery
by reading in 32bit values from STDIN. This way it's not necessary to implement your PRNG algorithm into TESTU01
because you can simply pipe the output of any PRNG written in the programming language you favour to the test battery.

Perhaps someone might find it useful. Comments are welcome.


At http://www.freecx.co.uk/crypto/crypt...Tools/TestU01/
you find all needed sources as well as some example PRNG source codes.

The original source code and explanation of TestU01 used in my implementation is located here
Empirical Testing of Random Number Generators


Running the given example PRNGs mentioned above against TESTU01_stdin we get the following results.

As expected a very basic LCG PRNG fails badly just the SmallCrush test

Code:
./LCG_stdio 0x2ddd6a2c 0xfffffffe | ./TestU01_stdin -s

========= Summary results of SmallCrush =========

 Version:          TestU01 1.2.3
 Generator:        32-bit stdin
 Number of statistics:  15
 Total CPU time:   00:00:24.80
 The following tests gave p-values outside [0.001, 0.9990]:
 (eps  means a value < 1.0e-300):
 (eps1 means a value < 1.0e-15):

       Test                          p-value
 ----------------------------------------------
  1  BirthdaySpacings                 eps  
  2  Collision                      1 - eps1
  3  Gap                              eps  
  4  SimpPoker                        eps  
  5  CouponCollector                  eps  
  7  WeightDistrib                    eps  
  8  MatrixRank                       eps  
  9  HammingIndep                     eps  
 10  RandomWalk1 H                    eps  
 10  RandomWalk1 M                    eps  
 10  RandomWalk1 J                   7.8e-7
 10  RandomWalk1 R                    eps  
 10  RandomWalk1 C                    eps  
 ----------------------------------------------
 All other tests were passed


Not that terribly bad as the above LCG does the systems Rand PRNG on the SmallCrush test

Code:
./C_Rand_stdio 0x2ddd6a2c 0xfffffffe | ./TestU01_stdin -s

========= Summary results of SmallCrush =========

 Version:          TestU01 1.2.3
 Generator:        32-bit stdin
 Number of statistics:  15
 Total CPU time:   00:00:25.71
 The following tests gave p-values outside [0.001, 0.9990]:
 (eps  means a value < 1.0e-300):
 (eps1 means a value < 1.0e-15):

       Test                          p-value
 ----------------------------------------------
  1  BirthdaySpacings                 eps  
  2  Collision                        eps  
  6  MaxOft                           eps  
  6  MaxOft AD                      1 - eps1
 10  RandomWalk1 H                    eps  
 10  RandomWalk1 M                    eps  
 10  RandomWalk1 J                    eps  
 10  RandomWalk1 R                    eps  
 10  RandomWalk1 C                    eps  
 ----------------------------------------------
 All other tests were passed


While a good PRNG however clearly pass the SmallCrush test

Code:
./bcd32_keystream 0x2ddd6a2c 0xfffffffe | ./TestU01_stdin -s


========= Summary results of SmallCrush =========

 Version:          TestU01 1.2.3
 Generator:        32-bit stdin
 Number of statistics:  15
 Total CPU time:   00:00:26.17

 All tests were passed