示例#1
0
 public void Test_GetPerimeter_WrongDimension()
 {
     Assert.Equal(S1Angle.Zero,
                  S2.GetPerimeter(MakeIndexOrDie("0:0 # #").Shape(0)));
     Assert.Equal(S1Angle.Zero,
                  S2ShapeIndexMeasures.GetPerimeter(MakeIndexOrDie("0:0, 0:1, 1:0")));
 }
 public void Test_GetPerimeter_DegeneratePolygon()
 {
     Assert2.Near(4.0, S2ShapeIndexMeasures.GetPerimeter(MakeIndexOrDie(
                                                             "4:4 # 0:0, 1:0 | 2:0, 3:0 # 0:1, 0:2, 0:3")).GetDegrees());
 }
 public void Test_GetPerimeter_Empty()
 {
     Assert.Equal(S1Angle.Zero, S2ShapeIndexMeasures.GetPerimeter(MakeIndexOrDie("# #")));
 }