The first test merely generates 2000 samples and ensures that each sample s satisfies s(transpose s) = I. The arguments to (fileVal "Matrix") include a non-standard zero test which merely requires that the tested value be within 2−36 of 0. These are floating point calculations, after all.
The second test is a pretty good test of invariance of the distribution under the group O(M). It chooses a fixed n×n orthogonal matrix, mx and then generates many other random matrices om from the distribution, and observes the signs of the individual components of some fixed row of the product of matrices mx and om. The 2n possible combinations of these signs should be equally likely. (ft M N Z) reports the histogram of sign combinations of row N from Z matrices, each M×M. Some results are reported and it seems flat enough for me. We could invoke the χ2 test.