Assume that we have a sequence of n independent and identically distributed random variables with a continuous distribution function F, which is specified up to a few unknown parameters. In this paper, tests based on sum-functions of sample spacings are proposed, and large sample theory of the tests are presented under simple null hypotheses as well as under close alternatives. Tests, which are optimal within this class, are constructed, and it is noted that these tests have properties that closely parallel those of the likelihood ratio test in regular parametric models. Some examples are given, which show that the proposed tests work also in situations where the likelihood ratio test breaks down. Extensions to more general hypotheses are discussed.