We study statistical tests of uniformity based on the L-p-distances between
the m nearest pairs of points, for n points generated uniformly over the k
-dimensional unit hypercube or unit torus. The number of distinct pairs at
distance no more than t, for t greater than or equal to 0, is a stochastic
process whose initial part, after an appropriate transformation and as n --
> infinity, is asymptotically a Poisson process with unit rate. Convergence
to this asymptotic is slow in the hypercube as soon as k exceeds 2 or 3, d
ue to edge effects, but is reasonably fast in the torus. We look at the qua
lity of approximation of the exact distributions of the tests statistics by
their asymptotic distributions, discuss computational issues, and apply th
e tests to random number generators. Linear congruential generators fail de
cisively certain variants of the tests as soon as n approaches the square r
oot of the period length.