Test weights computation