There are divergent aptitude tests measure quantity and diversity of answers to a given question opposed to the one desired answer. Divergent tests are rarely performed, but at a stronger measure of creativity and problem solving which is typically what people actually want when they say intelligence. The reason why convergent testing is preferred over divergent test is because it is easier to measure and those simplified measures are easier to compare.
> Testing or measuring procedures cannot be determinative in employment decisions unless they have some connection to the job.
IQ tests are not directly related to the job, and so are illegal according to that ruling. Coding tests are directly related, which is why they get a pass.