Testing line ordering and intersection