fixed squared_distance tests