Reordering tests; throw error if all weights are negative