The century-old Hardy-Weinberg law remains fundamental to population genetics. Typically Hardy-Weinberg equilibrium is tested in unrelated individuals using a chi(2) goodness-of-fit test that compares expected and observed numbers of heterozygotes and homozygotes. In this report, we propose a likelihood ratio test for Hardy-Weinberg equilibrium that accommodates a mixture of pedigree and random sample data. The underlying statistical model depends on a parameter gamma determining the ratio of heterozygous genotypes to homozygous genotypes among pedigree founders. As our heterozygous-homozygous test accommodates markers with dominant and recessive alleles, it can handle the phase ambiguities encountered in combining several linked single nucleotide polymorphisms into a single supermarker. No prior haplotyping is necessary. Our experience on real and simulated data suggests that the heterozygous-homozygous test has good type-one error and power.