SetsTesting.Mesa
Last tweaked by Mike Spreitzer on January 29, 1988 1:00:48 pm PST
DIRECTORY AbSets, Random, SetBasics;
SetsTesting: CEDAR PROGRAM
IMPORTS AbSets, Random, SetBasics
=
BEGIN OPEN SetBasics, Sets:AbSets, Sets;
rs: Random.RandomStream ~ Random.Create[seed: -1];
TestHashSet: PROC [nins, ntest: NAT] ~ {
set: Set--of INT-- ~ CreateHashSet[ints];
nins ← nins;
THROUGH [0 .. nins) DO
[] ← set.AddI[rs.NextInt[]];
ENDLOOP;
nins ← nins;
THROUGH [0 .. ntest) DO
[] ← set.HasMemI[rs.NextInt[]];
ENDLOOP;
nins ← nins;
RETURN};
END.