Test calculate_target.