fix TriangleConstraint for PSR invariance
add TestCase for PSR invariance.