Applications of computer-generated holograms in optical testing